Bug#21011 The [client] group header was overwritten by "password" option in...

Bug#21011 The [client] group header was overwritten by "password" option in upgrade_defaults file which confused mysqlcheck thus used to prevent the whole thing from running correctly when the "--password=" option is specified on mysql_upgrade command line with no corresponding "--user=" option
parent 4fa6c8c7
...@@ -200,7 +200,7 @@ static int create_defaults_file(const char *path, const char *our_defaults_path) ...@@ -200,7 +200,7 @@ static int create_defaults_file(const char *path, const char *our_defaults_path)
} }
buffer_end= strnmov(buffer, "\n[client]", sizeof(buffer)); buffer_end= strnmov(buffer, "\n[client]", sizeof(buffer));
if (opt_password) if (opt_password)
buffer_end= strxnmov(buffer, sizeof(buffer), buffer_end= strxnmov(buffer_end, sizeof(buffer),
"\npassword=", opt_password, NullS); "\npassword=", opt_password, NullS);
error= my_write(defaults_file, buffer, (int) (buffer_end - buffer), error= my_write(defaults_file, buffer, (int) (buffer_end - buffer),
MYF(MY_WME | MY_FNABP)); MYF(MY_WME | MY_FNABP));
......
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