polardbxengine/mysql-test/t/mysql_upgrade_options.test

97 lines
3.6 KiB
Plaintext

#Execute mysql_upgrade with different options
#
# Test the --upgrade-system-tables option
#
--replace_result $MYSQLTEST_VARDIR var
--exec $MYSQL_UPGRADE --skip-verbose --force --upgrade-system-tables
--exec $MYSQL_UPGRADE -uroot --password= --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --skip-write-binlog..
--replace_result $MYSQLTEST_VARDIR var
--exec $MYSQL_UPGRADE --skip-verbose --skip-write-binlog
--echo # Running mysql_upgrade with --write-binlog..
--replace_result $MYSQLTEST_VARDIR var
--exec $MYSQL_UPGRADE --skip-verbose --write-binlog
--echo # Running mysql_upgrade with --max-allowed-packet=4096..
--exec $MYSQL_UPGRADE --max-allowed-packet=4096 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --max-allowed-packet=2147483648..
--exec $MYSQL_UPGRADE --max-allowed-packet=2147483648 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --max-allowed-packet=4095..
--exec $MYSQL_UPGRADE --max-allowed-packet=4095 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --max-allowed-packet=1000..
--exec $MYSQL_UPGRADE --max-allowed-packet=1000 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --max-allowed-packet=2147483649..
--exec $MYSQL_UPGRADE --max-allowed-packet=2147483649 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --max-allowed-packet=21474836480..
--exec $MYSQL_UPGRADE --max-allowed-packet=2147484652 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --net-buffer-length=4096..
--exec $MYSQL_UPGRADE --net-buffer-length=4096 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --net-buffer-length=16777216..
--exec $MYSQL_UPGRADE --net-buffer-length=16777216 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --net-buffer-length=4095..
--exec $MYSQL_UPGRADE --net-buffer-length=4095 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --net-buffer-length=1024..
--exec $MYSQL_UPGRADE --net-buffer-length=1024 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --net-buffer-length=16777217..
--exec $MYSQL_UPGRADE --net-buffer-length=16777217 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --net-buffer-length=167772160..
--exec $MYSQL_UPGRADE --net-buffer-length=167772160 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --bind-address..
--exec $MYSQL_UPGRADE --bind-address=127.0.0.1 --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with -C option..
--exec $MYSQL_UPGRADE -C --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --compress..
--exec $MYSQL_UPGRADE --compress --skip-verbose --force 2>&1
--echo # Running mysql_upgrade with --verbose..
--exec $MYSQL_UPGRADE --verbose --force 2>&1
--echo # Running mysql_upgrade with --protocol..
--exec $MYSQL_UPGRADE --protocol=TCP --skip-verbose --force 2>&1
--echo # Test positional arguments
--exec $MYSQL_UPGRADE --force --skip-verbose not_used_positional_argument 2>&1
--echo #
--echo # WL#7010: Remove unused --basedir and --datadir options
--echo # from mysql_upgrade
--echo #
--echo Run mysql_upgrade with --datadir : should fail
--replace_regex /.*mysql_upgrade.*: unk/mysql_upgrade: unk/
--error 7
--exec $MYSQL_UPGRADE --skip-verbose --force --datadir=somedir 2>&1
--echo Run mysql_upgrade with --basedir : should fail
--replace_regex /.*mysql_upgrade.*: unk/mysql_upgrade: unk/
--error 7
--exec $MYSQL_UPGRADE --skip-verbose --force --basedir=somedir 2>&1
--echo # Running mysql_upgrade with invalid/incorrect options
--error 2
--exec $MYSQL_UPGRADE -c --force 2>&1
--error 2
--exec $MYSQL_UPGRADE -t --force 2>&1
--error 1
--exec $MYSQL_UPGRADE --protocol=AAA --force 2>&1