Don't use the MYSQL* returned from mysql_real_connect to overwrite the already...

Don't use the MYSQL* returned from mysql_real_connect to overwrite the already initalised mysql variable
parent c1e9bb8d
...@@ -1132,11 +1132,11 @@ run_task(thread_context *con) ...@@ -1132,11 +1132,11 @@ run_task(thread_context *con)
my_lock(lock_file, F_RDLCK, 0, F_TO_EOF, MYF(0)); my_lock(lock_file, F_RDLCK, 0, F_TO_EOF, MYF(0));
if (!opt_only_print) if (!opt_only_print)
{ {
if (!(mysql= mysql_real_connect(mysql, host, user, opt_password, if (!(mysql_real_connect(mysql, host, user, opt_password,
create_schema_string, create_schema_string,
opt_mysql_port, opt_mysql_port,
opt_mysql_unix_port, opt_mysql_unix_port,
0))) 0)))
{ {
fprintf(stderr,"%s: %s\n",my_progname,mysql_error(mysql)); fprintf(stderr,"%s: %s\n",my_progname,mysql_error(mysql));
goto end; goto end;
......
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