summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql_upgrade.test
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay.choubey@oracle.com>2011-11-15 17:48:42 +0530
committerNirbhay Choubey <nirbhay.choubey@oracle.com>2011-11-15 17:48:42 +0530
commit0c5097457393cd9fd3f96e46207bd3b48227756f (patch)
tree6ed6fad9c1a5b134acf3f3580447a0c4cdceb0e8 /mysql-test/t/mysql_upgrade.test
parent99230c9b7996e39dd5156371d99e12f504703612 (diff)
downloadmariadb-git-0c5097457393cd9fd3f96e46207bd3b48227756f.tar.gz
Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG System tables were not getting upgraded when mysql_upgrade was run with --skip-write-binlog option. (Same for --write-binlog.) Also, with this option, mysql_upgrade_info file was not getting created after the upgrade. mysql_upgrade makes use of mysql client tool in order to run upgrade scripts, while doing so it passes some of the command line options (used to start mysql_upgrade) directly to mysql client. The reason behind this bug being, some options like skip-write-binlog and upgrade-system-tables were being passed to mysql tool along with other options, and hence mysql execution failed due presence of these invalid options. Fixed this issue by filtering out the above mentioned options from the list of options that will be passed to mysql and mysqlcheck tools. However, since --write-binlog is supported by mysqlcheck, this option would be used explicitly while running mysqlcheck. (not part of patch, already there) Checking the contents of general log after the upgrade is not doable via an mtr test. So performed manual test. Added a test to verify the creation of mysql_upgrade_info.
Diffstat (limited to 'mysql-test/t/mysql_upgrade.test')
-rw-r--r--mysql-test/t/mysql_upgrade.test21
1 files changed, 20 insertions, 1 deletions
diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test
index 3c6cc45da38..05b8c81a797 100644
--- a/mysql-test/t/mysql_upgrade.test
+++ b/mysql-test/t/mysql_upgrade.test
@@ -102,5 +102,24 @@ DROP USER 'user3'@'%';
# Test the --upgrade-system-tables option
#
--replace_result $MYSQLTEST_VARDIR var
---exec $MYSQL_UPGRADE --skip-verbose --upgrade-system-tables
+--exec $MYSQL_UPGRADE --skip-verbose --force --upgrade-system-tables
+--echo #
+--echo # Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
+--echo # SKIP-WRITE-BINLOG
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+--echo # Droping the previously created mysql_upgrade_info file..
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo # Running mysql_upgrade with --skip-write-binlog..
+--replace_result $MYSQLTEST_VARDIR var
+--exec $MYSQL_UPGRADE --skip-verbose --skip-write-binlog
+
+# mysql_upgrade must have created mysql_upgrade_info file,
+# so the following command should never fail.
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+--echo End of tests