summaryrefslogtreecommitdiff
path: root/client/mysqlimport.c
diff options
context:
space:
mode:
authorbrian@zim.tangent.org <>2006-02-19 09:41:59 -0800
committerbrian@zim.tangent.org <>2006-02-19 09:41:59 -0800
commitfaa1b42989aa1a97c56cd53e06ec6dcb4dcc8b4c (patch)
treed05f774b368556fbf12cea7bddef5d6e079d6fd2 /client/mysqlimport.c
parent46620c4ab94e1ec664c53622f235969fe11deb24 (diff)
downloadmariadb-git-faa1b42989aa1a97c56cd53e06ec6dcb4dcc8b4c.tar.gz
Fixed some threading issues that Guilhem found (and its what I get for copy and pasting from elsewhere without thinking about it). Added depracted messages to BACKUP, RESTORE, and LOAD TABLE FROM MASTER (which doesn't work well).
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r--client/mysqlimport.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index df36a9f0c00..4296ab327dd 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -516,7 +516,11 @@ pthread_handler_t worker_thread(void *arg)
{
int error;
char *raw_table_name= (char *)arg;
- MYSQL *mysql;
+ MYSQL *mysql= 0;
+
+ if (mysql_thread_init())
+ goto error;
+
if (!(mysql= db_connect(current_host,current_db,current_user,opt_password)))
{
goto error;
@@ -528,6 +532,9 @@ pthread_handler_t worker_thread(void *arg)
goto error;
}
+ /*
+ We are not currently catching the error here.
+ */
if((error= write_to_table(raw_table_name, mysql)))
if (exitcode == 0)
exitcode= error;
@@ -539,6 +546,8 @@ error:
pthread_mutex_lock(&counter_mutex);
counter--;
pthread_mutex_unlock(&counter_mutex);
+ my_thread_end();
+
return 0;
}