diff options
author | df@pippilotta.erinye.com <> | 2007-06-15 09:36:05 +0200 |
---|---|---|
committer | df@pippilotta.erinye.com <> | 2007-06-15 09:36:05 +0200 |
commit | 973c541b5c609f9894fb64c39b4407e944f12460 (patch) | |
tree | 3683b9e2e72f2a7295b74f86d208c75ab69e78b2 /client | |
parent | fb3a572ff889faa34000db31eb6100f10e42e91a (diff) | |
parent | 9ab46d008858b2780db4d5ceb74a4627a0a6871e (diff) | |
download | mariadb-git-973c541b5c609f9894fb64c39b4407e944f12460.tar.gz |
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 2d9ee74891c..7eb80e4594f 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -496,6 +496,10 @@ void handle_error(struct st_command*, void handle_no_error(struct st_command*); #ifdef EMBEDDED_LIBRARY + +/* attributes of the query thread */ +pthread_attr_t cn_thd_attrib; + /* send_one_query executes query in separate thread what is necessary in embedded library to run 'send' in proper way. @@ -534,7 +538,7 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len, cn->cur_query= q; cn->cur_query_len= q_len; cn->query_done= 0; - if (pthread_create(&tid, NULL, send_one_query, (void*)cn)) + if (pthread_create(&tid, &cn_thd_attrib, send_one_query, (void*)cn)) die("Cannot start new thread for query"); return 0; @@ -6170,6 +6174,12 @@ int main(int argc, char **argv) next_con= connections + 1; cur_con= connections; +#ifdef EMBEDDED_LIBRARY + /* set appropriate stack for the 'query' threads */ + (void) pthread_attr_init(&cn_thd_attrib); + pthread_attr_setstacksize(&cn_thd_attrib, DEFAULT_THREAD_STACK); +#endif /*EMBEDDED_LIBRARY*/ + /* Init file stack */ memset(file_stack, 0, sizeof(file_stack)); file_stack_end= |