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