summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-06-09 00:39:23 +0500
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-06-09 00:39:23 +0500
commit99b4321ac5e577b965adf3fa0db6f5ae92450fe1 (patch)
treefad097b564328a706467d9e23881792a06a85e77 /client
parente409a8a5c0402859ec0754e5d060e3ae06df4c6e (diff)
downloadmariadb-git-99b4321ac5e577b965adf3fa0db6f5ae92450fe1.tar.gz
Bug #28333 Test "flush" tries to create a new thread - on only one platform
on PPC/Debian Linux default stack size for a thread is too big. As we use default thread settings in mysqltest, the thread creation fails if we create lots of threads (as it happens in flush.test). So now stack size is explicitly specified for the mysqltest client/mysqltest.c: Bug #28333 Test "flush" tries to create a new thread - on only one platform specify appropriate stack size for the 'query' thread
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 5640d0c24ba..77cdb93dfe5 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;
@@ -5999,6 +6003,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=