diff options
author | unknown <brian@zim.tangent.org> | 2006-02-19 09:41:59 -0800 |
---|---|---|
committer | unknown <brian@zim.tangent.org> | 2006-02-19 09:41:59 -0800 |
commit | 99502158b7dca8bc5be4a52ecf30a671739a6b84 (patch) | |
tree | d05f774b368556fbf12cea7bddef5d6e079d6fd2 /client/mysqlimport.c | |
parent | 309f51cd28625316f2eb2ad34ba0f95b0d986264 (diff) | |
download | mariadb-git-99502158b7dca8bc5be4a52ecf30a671739a6b84.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).
client/Makefile.am:
Added threaded libary.
client/mysqlimport.c:
Updated logic to use threaded libmysql correctly.
client/mysqlslap.c:
Modified how threads were working.
mysql-test/r/backup.result:
Added deprecated messages.
sql/sql_yacc.yy:
Added deprecated messages to RESTORE, BACKUP, and LOAD TABLE FROM MASTER
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r-- | client/mysqlimport.c | 11 |
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; } |