Last active
December 25, 2015 16:09
-
-
Save yoku0825/7003161 to your computer and use it in GitHub Desktop.
MySQL Bugs #70624 mysql_upgrade with --skip-write-binlog doesn't workのパッチ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** client/mysql_upgrade.c.org 2013-09-10 04:23:26.000000000 +0900 | |
--- client/mysql_upgrade.c 2013-10-18 11:23:45.550804050 +0900 | |
*************** | |
*** 44,49 **** | |
--- 44,50 ---- | |
static DYNAMIC_STRING ds_args; | |
static DYNAMIC_STRING conn_args; | |
+ static char mysql_arg[FN_REFLEN]; | |
static char *opt_password= 0; | |
static my_bool tty_password= 0; | |
*************** | |
*** 497,503 **** | |
ret= run_tool(mysql_path, | |
ds_res, | |
"--no-defaults", | |
! ds_args.str, | |
"--database=mysql", | |
"--batch", /* Turns off pager etc. */ | |
force ? "--force": "--skip-force", | |
--- 498,504 ---- | |
ret= run_tool(mysql_path, | |
ds_res, | |
"--no-defaults", | |
! mysql_arg, | |
"--database=mysql", | |
"--batch", /* Turns off pager etc. */ | |
force ? "--force": "--skip-force", | |
*************** | |
*** 854,859 **** | |
--- 855,877 ---- | |
/* Find mysqlcheck */ | |
find_tool(mysqlcheck_path, IF_WIN("mysqlcheck.exe", "mysqlcheck"), self_name); | |
+ /* added by yoku0825 & irok */ | |
+ strcpy(mysql_arg, ds_args.str); | |
+ | |
+ char *ign = "'--write-binlog'", *p; | |
+ int ignlen = strlen(ign); | |
+ | |
+ while (p= strstr(mysql_arg, ign)) | |
+ strcpy(p- (p> mysql_arg), p+ ignlen); | |
+ | |
+ if (mysql_arg[0]== ' ') | |
+ strcpy(mysql_arg, mysql_arg+ 1); | |
+ | |
+ my_delete(ign, MYF(0)); | |
+ my_delete(ignlen, MYF(0)); | |
+ my_delete(p, MYF(0)); | |
+ /* end */ | |
+ | |
/* | |
Read the mysql_upgrade_info file to check if mysql_upgrade | |
already has been run for this installation of MySQL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment