List:Commits« Previous MessageNext Message »
From:holyfoot Date:June 8 2007 7:39pm
Subject:bk commit into 5.0 tree (holyfoot:1.2514) BUG#28333
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-06-09 00:39:23+05:00, holyfoot@stripped +1 -0
  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@stripped, 2007-06-09 00:39:21+05:00, holyfoot@stripped +11 -1
    Bug #28333 Test "flush" tries to create a new thread - on only one platform
    
    specify appropriate stack size for the 'query' thread

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	holyfoot
# Host:	hfmain.(none)
# Root:	/home/hf/work/28333/my50-28333

--- 1.292/client/mysqltest.c	2007-06-09 00:39:28 +05:00
+++ 1.293/client/mysqltest.c	2007-06-09 00:39:28 +05:00
@@ -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_conne
   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;
@@ -5998,6 +6002,12 @@ int main(int argc, char **argv)
     (sizeof(connections)/sizeof(struct st_connection)) - 1;
   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));
Thread
bk commit into 5.0 tree (holyfoot:1.2514) BUG#28333holyfoot8 Jun