summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-06-14 16:42:43 +0500
committerunknown <holyfoot/hf@hfmain.(none)>2007-06-14 16:42:43 +0500
commit0662a9b78a201a0343004bc3066f8587f49f4e6c (patch)
tree970f3c802c31f6740056dc4d047fed4ec26d9ab9 /client
parent73016f8f90edecb433e7ebbf09f0b261c19dce84 (diff)
parent167751b3f08295f9cdf752d48af196698867eca3 (diff)
downloadmariadb-git-0662a9b78a201a0343004bc3066f8587f49f4e6c.tar.gz
Merge bk@192.168.21.1:mysql-5.1
into mysql.com:/d2/hf/mrg/mysql-5.1-opt client/mysqltest.c: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/include/mix1.inc: merging mysql-test/r/innodb_mysql.result: merging sql/sql_select.cc: merging
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 1911bfa0ad0..0a1b57ff80a 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -480,6 +480,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.
@@ -518,7 +522,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;
@@ -6156,6 +6160,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=