Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MySQL Bugs #70624 mysql_upgrade with --skip-write-binlog doesn't workのパッチ
*** 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
You can’t perform that action at this time.