diff options
author | Arun Kuruvila <arun.kuruvila@oracle.com> | 2016-06-03 12:50:23 +0530 |
---|---|---|
committer | Arun Kuruvila <arun.kuruvila@oracle.com> | 2016-06-03 12:50:23 +0530 |
commit | df0d8efaf25a69990cf422d55011c1c0eebdec51 (patch) | |
tree | 32a29de12039ef91f8dccaed7821e073d0dc5518 /client | |
parent | 07e50c4291b3f771b3606362c05b3a6e495a3448 (diff) | |
download | mariadb-git-df0d8efaf25a69990cf422d55011c1c0eebdec51.tar.gz |
Bug#23035296: MAIN.MYSQLDUMP FAILS BECUASE OF UNEXPECTED
ERROR MESSAGE
Post push patch to fix test case failure.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlimport.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c index 81eb5a37fde..5841c0b855a 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -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) |