mysqlimport.c:
Removed C++ comment, changed types for pthread_create() usage client/mysqlimport.c: Removed C++ comment, changed types for pthread_create() usage
This commit is contained in:
parent
fbe0ba737e
commit
cf217b9cf5
@ -510,9 +510,9 @@ static char *field_escape(char *to,const char *from,uint length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
pthread_handler_t worker_thread(void *arg)
|
||||||
worker_thread(char *raw_table_name)
|
|
||||||
{
|
{
|
||||||
|
char *raw_table_name= (char *)arg;
|
||||||
MYSQL *sock= 0;
|
MYSQL *sock= 0;
|
||||||
if (!(sock= db_connect(current_host,current_db,current_user,opt_password)))
|
if (!(sock= db_connect(current_host,current_db,current_user,opt_password)))
|
||||||
{
|
{
|
||||||
@ -562,7 +562,7 @@ int main(int argc, char **argv)
|
|||||||
pthread_attr_t attr; /* Thread attributes */
|
pthread_attr_t attr; /* Thread attributes */
|
||||||
VOID(pthread_mutex_init(&counter_mutex, NULL));
|
VOID(pthread_mutex_init(&counter_mutex, NULL));
|
||||||
|
|
||||||
for (; *argv != NULL; argv++) // Loop through tables
|
for (; *argv != NULL; argv++) /* Loop through tables */
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
If we hit thread count limit we loop until some threads exit.
|
If we hit thread count limit we loop until some threads exit.
|
||||||
@ -583,7 +583,7 @@ sanity_label:
|
|||||||
PTHREAD_CREATE_DETACHED);
|
PTHREAD_CREATE_DETACHED);
|
||||||
|
|
||||||
/* now create the thread */
|
/* now create the thread */
|
||||||
if (pthread_create(&mainthread, &attr, (void *)worker_thread,
|
if (pthread_create(&mainthread, &attr, worker_thread,
|
||||||
(void *)*argv) != 0)
|
(void *)*argv) != 0)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&counter_mutex);
|
pthread_mutex_lock(&counter_mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user