diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-10-09 16:43:59 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-10-09 16:43:59 +0200 |
commit | 16c4b3c68b06653592a9500050ad977a38f4ebae (patch) | |
tree | 9c26da00fe119d92efd3792987c3790d7d0fb409 /client | |
parent | f41a41fd912af97bc2703d3fcec8d1a294bef023 (diff) | |
download | mariadb-git-16c4b3c68b06653592a9500050ad977a38f4ebae.tar.gz |
fixes for buildbot:mariadb-5.5.46
* OSX (mysqlimport freeing unallocated memory)
* Windows (didn't compile MSI)
* fulltest2 (innodb crashes in --embedded --big)
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlimport.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c index 1f047fdf4b3..a22774bc684 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -36,7 +36,7 @@ /* Global Thread counter */ -uint counter; +uint counter= 0; pthread_mutex_t counter_mutex; pthread_cond_t count_threshhold; @@ -482,6 +482,11 @@ static void safe_exit(int error, MYSQL *mysql) { if (error && ignore_errors) return; + + /* in multi-threaded mode protect from concurrent safe_exit's */ + if (counter) + pthread_mutex_lock(&counter_mutex); + if (mysql) mysql_close(mysql); |