List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:September 9 2010 12:55pm
Subject:bzr commit into mysql-5.1-mtr branch (bjorn.munch:2929) Bug#55546
View as plain text  
#At file:///home/bm136801/my/hpthr-51/ based on revid:bjorn.munch@stripped

 2929 Bjorn Munch	2010-09-09
      Bug #55546 mysqltest fails to create a new thread on HPUX
      Looks like we have to pthread_join().
      Added necessary code but only for HPUX

    modified:
      client/mysqltest.cc
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-08-30 09:26:40 +0000
+++ b/client/mysqltest.cc	2010-09-09 12:54:26 +0000
@@ -243,6 +243,9 @@ struct st_connection
   pthread_mutex_t mutex;
   pthread_cond_t cond;
   int query_done;
+#if defined(HPUX10) || defined(HPUX11)
+  pthread_t tid;
+#endif /* HPUX */
 #endif /*EMBEDDED_LIBRARY*/
 };
 
@@ -748,6 +751,9 @@ static int do_send_query(struct st_conne
   if (pthread_create(&tid, &cn_thd_attrib, send_one_query, (void*)cn))
     die("Cannot start new thread for query");
 
+#if defined(HPUX10) || defined(HPUX11)
+  cn->tid= tid;
+#endif /* HPUX */
   return 0;
 }
 
@@ -760,6 +766,10 @@ static void wait_query_thread_end(struct
       pthread_cond_wait(&con->cond, &con->mutex);
     pthread_mutex_unlock(&con->mutex);
   }
+#if defined(HPUX10) || defined(HPUX11)
+  /* Only need to do this on HPUX, Bug #55546 */
+  pthread_join(con->tid, 0); 
+#endif /* HPUX */
 }
 
 #else /*EMBEDDED_LIBRARY*/


Attachment: [text/bzr-bundle] bzr/bjorn.munch@oracle.com-20100909125426-cnec2iycg6ofvmyy.bundle
Thread
bzr commit into mysql-5.1-mtr branch (bjorn.munch:2929) Bug#55546Bjorn Munch9 Sep