From: Date: October 16 2007 5:04pm Subject: bk commit into 5.1 tree (tomas:1.2668) BUG#31618 List-Archive: http://lists.mysql.com/commits/35666 X-Bug: 31618 Message-Id: <20071016150420.9F2F41830B33D@linux.local> 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@stripped, 2007-10-16 17:04:15+02:00, tomas@stripped +1 -0 Bug #31618 ndb_binlog_discover test failure - ndb_latest_handled_binlog_epoch may not have been initialized when show binlog events is executed sql/ha_ndbcluster_binlog.cc@stripped, 2007-10-16 17:04:12+02:00, tomas@stripped +8 -3 Bug #31618 ndb_binlog_discover test failure - ndb_latest_handled_binlog_epoch may not have been initialized when show binlog events is executed diff -Nrup a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc --- a/sql/ha_ndbcluster_binlog.cc 2007-10-16 11:02:07 +02:00 +++ b/sql/ha_ndbcluster_binlog.cc 2007-10-16 17:04:12 +02:00 @@ -490,12 +490,17 @@ static void ndbcluster_binlog_wait(THD * if (thd) thd->proc_info= "Waiting for ndbcluster binlog update to " "reach current position"; - while (count && ndb_binlog_running && - ndb_latest_handled_binlog_epoch < wait_epoch) + pthread_mutex_lock(&injector_mutex); + while (!thd->killed && count && ndb_binlog_running && + (ndb_latest_handled_binlog_epoch == 0 || + ndb_latest_handled_binlog_epoch < wait_epoch)) { count--; - sleep(1); + struct timespec abstime; + set_timespec(abstime, 1); + pthread_cond_timedwait(&injector_cond, &injector_mutex, &abstime); } + pthread_mutex_unlock(&injector_mutex); if (thd) thd->proc_info= save_info; DBUG_VOID_RETURN;