Commit ef56d39b authored by unknown's avatar unknown

Fix bad merge of mysql_upgrade.c; return to version 1.27 of the file, as after fix for bug 25074

parent 5948063b
...@@ -173,7 +173,7 @@ void set_extra_default(int id, const struct my_option *opt) ...@@ -173,7 +173,7 @@ void set_extra_default(int id, const struct my_option *opt)
} }
d= (extra_default_t *)my_malloc(sizeof(extra_default_t), d= (extra_default_t *)my_malloc(sizeof(extra_default_t),
MYF(MY_FAE | MY_ZEROFILL)); MYF(MY_FAE|MY_ZEROFILL));
d->id= id; d->id= id;
d->name= opt->name; d->name= opt->name;
d->n_len= strlen(opt->name); d->n_len= strlen(opt->name);
...@@ -366,7 +366,7 @@ static int create_defaults_file(const char *path, const char *forced_path) ...@@ -366,7 +366,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
goto error; goto error;
} }
DBUG_PRINT("info", ("%s", buf.str)); DBUG_PRINT("info", ("%s", buf.str));
my_free((gptr) d, MYF(0)); my_free((gptr)d, MYF(0));
list_pop(extra_defaults); /* pop off the head */ list_pop(extra_defaults); /* pop off the head */
} }
if (my_write(defaults_file, buf.str, buf.length, MYF(MY_FNABP | MY_WME))) if (my_write(defaults_file, buf.str, buf.length, MYF(MY_FNABP | MY_WME)))
...@@ -463,9 +463,8 @@ int main(int argc, char **argv) ...@@ -463,9 +463,8 @@ int main(int argc, char **argv)
char *forced_defaults_file; char *forced_defaults_file;
char *forced_extra_defaults; char *forced_extra_defaults;
char *local_defaults_group_suffix; char *local_defaults_group_suffix;
int no_defaults;
char path[FN_REFLEN], upgrade_defaults_path[FN_REFLEN];
char path[FN_REFLEN], upgrade_defaults_path[FN_REFLEN];
DYNAMIC_STRING cmdline; DYNAMIC_STRING cmdline;
MY_INIT(argv[0]); MY_INIT(argv[0]);
...@@ -587,9 +586,7 @@ int main(int argc, char **argv) ...@@ -587,9 +586,7 @@ int main(int argc, char **argv)
instruct mysqlcheck to only read options from that file instruct mysqlcheck to only read options from that file
*/ */
dynstr_append(&cmdline, " "); dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, dynstr_append_os_quoted(&cmdline, "--defaults-file=",
(no_defaults ? "--defaults-file=" :
"--defaults-extra-file="),
upgrade_defaults_path, NullS); upgrade_defaults_path, NullS);
dynstr_append(&cmdline, " "); dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--check-upgrade", NullS); dynstr_append_os_quoted(&cmdline, "--check-upgrade", NullS);
...@@ -664,9 +661,7 @@ int main(int argc, char **argv) ...@@ -664,9 +661,7 @@ int main(int argc, char **argv)
instruct mysql to only read options from that file instruct mysql to only read options from that file
*/ */
dynstr_append(&cmdline, " "); dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, dynstr_append_os_quoted(&cmdline, "--defaults-file=",
(no_defaults ? "--defaults-file=" :
"--defaults-extra-file="),
upgrade_defaults_path, NullS); upgrade_defaults_path, NullS);
dynstr_append(&cmdline, " "); dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--force", NullS); dynstr_append_os_quoted(&cmdline, "--force", NullS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment