summaryrefslogtreecommitdiff
path: root/client
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
commit4df195a4caae2d084798ee50bafa0dfeef85a9bf (patch)
tree6ed6fad9c1a5b134acf3f3580447a0c4cdceb0e8 /client
parent38138943618ab00d82044a82e0da81527a267a6b (diff)
downloadmariadb-git-4df195a4caae2d084798ee50bafa0dfeef85a9bf.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. client/mysql_upgrade.c: Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION SKIP-WRITE-BINLOG With this patch, --upgrade-system-tables and --write-binlog options will not be added to the list of options, used to start mysql and mysqlcheck tools. mysql-test/r/mysql_upgrade.result: Added a testcase for Bug#11827359. mysql-test/t/mysql_upgrade.test: Added a testcase for Bug#11827359.
Diffstat (limited to 'client')
-rw-r--r--client/mysql_upgrade.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index fb4be716df2..684d20c29a8 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -286,6 +286,8 @@ get_one_option(int optid, const struct my_option *opt,
case 'v': /* --verbose */
case 'f': /* --force */
+ case 's': /* --upgrade-system-tables */
+ case OPT_WRITE_BINLOG: /* --write-binlog */
add_option= FALSE;
break;