From: Date: May 26 2005 5:31pm Subject: bk commit into 5.1 tree (tomas:1.1888) List-Archive: http://lists.mysql.com/internals/25345 Message-Id: <20050526153159.B411F1F30B8@poseidon.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of tomas. When tomas 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 1.1888 05/05/26 17:31:49 tomas@stripped +1 -0 ha_ndbcluster.cc: corrected usage of injector_mutex and moved up delete of thd object in ndb binlog thread sql/ha_ndbcluster.cc 1.258 05/05/26 17:30:27 tomas@stripped +10 -6 corrected usage of injector_mutex and moved up delete of thd object in ndb binlog 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: tomas # Host: poseidon.ndb.mysql.com # Root: /home/tomas/mysql-5.1-wl2325 --- 1.257/sql/ha_ndbcluster.cc 2005-05-26 16:24:04 +02:00 +++ 1.258/sql/ha_ndbcluster.cc 2005-05-26 17:30:27 +02:00 @@ -5478,10 +5478,13 @@ #ifdef HAVE_REPLICATION // wait for injector thread to finish - pthread_mutex_lock(&injector_mutex); - while(ndb_injector_thread_running>0) - pthread_cond_wait(&injector_cond,&injector_mutex); - pthread_mutex_unlock(&injector_mutex); + if (ndb_injector_thread_running > 0) + { + pthread_mutex_lock(&injector_mutex); + while (ndb_injector_thread_running > 0) + pthread_cond_wait(&injector_cond,&injector_mutex); + pthread_mutex_unlock(&injector_mutex); + } /* remove all shares */ { @@ -9477,11 +9480,12 @@ ndb= 0; } + thd->cleanup(); + delete thd; + ndb_injector_thread_running= -1; (void) pthread_cond_signal(&injector_cond); - thd->cleanup(); - delete thd; DBUG_PRINT("exit", ("ndb_injector_thread")); my_thread_end();