Commit df0d8efa authored by Arun Kuruvila's avatar Arun Kuruvila

Bug#23035296: MAIN.MYSQLDUMP FAILS BECUASE OF UNEXPECTED

              ERROR MESSAGE

Post push patch to fix test case failure.
parent 07e50c42
......@@ -418,13 +418,19 @@ static MYSQL *db_connect(char *host, char *database,
MYSQL *mysql;
if (verbose)
fprintf(stdout, "Connecting to %s\n", host ? host : "localhost");
pthread_mutex_lock(&init_mutex);
if (!(mysql= mysql_init(NULL)))
if (opt_use_threads && !lock_tables)
{
pthread_mutex_lock(&init_mutex);
if (!(mysql= mysql_init(NULL)))
{
pthread_mutex_unlock(&init_mutex);
return 0;
}
pthread_mutex_unlock(&init_mutex);
return 0;
}
pthread_mutex_unlock(&init_mutex);
else
if (!(mysql= mysql_init(NULL)))
return 0;
if (opt_compress)
mysql_options(mysql,MYSQL_OPT_COMPRESS,NullS);
if (opt_local_file)
......
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