From: Date: December 14 2007 1:43pm Subject: bk commit into 5.0 tree (tomas:1.2579) BUG#33237 List-Archive: http://lists.mysql.com/commits/39985 X-Bug: 33237 Message-Id: <20071214124352.8DFB418114634@linux.local> Below is the list of changes that have just been committed into a local 5.0 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-12-14 13:43:48+01:00, tomas@stripped +1 -0 Bug #33237 NDB_MGM 'eat' 99% cpu utilization ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2007-12-14 13:43:46+01:00, tomas@stripped +11 -6 Bug #33237 NDB_MGM 'eat' 99% cpu utilization diff -Nrup a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp --- a/ndb/src/mgmclient/CommandInterpreter.cpp 2007-09-12 13:53:30 +02:00 +++ b/ndb/src/mgmclient/CommandInterpreter.cpp 2007-12-14 13:43:46 +01:00 @@ -921,10 +921,14 @@ event_thread_run(void* p) { do_event_thread= 1; do { - if (ndb_logevent_get_next(log_handle, &log_event, 2000) <= 0) - continue; - Guard g(printmutex); - printLogEvent(&log_event); + int res= ndb_logevent_get_next(log_handle, &log_event, 2000); + if (res > 0) + { + Guard g(printmutex); + printLogEvent(&log_event); + } + else if (res < 0) + break; } while(do_event_thread); ndb_mgm_destroy_logevent_handle(&log_handle); } @@ -2722,8 +2726,9 @@ CommandInterpreter::executeStartBackup(c { int count = 0; int retry = 0; + int res; do { - if (ndb_logevent_get_next(log_handle, &log_event, 60000) > 0) + if ((res= ndb_logevent_get_next(log_handle, &log_event, 60000)) > 0) { int print = 0; switch (log_event.type) { @@ -2753,7 +2758,7 @@ CommandInterpreter::executeStartBackup(c { retry++; } - } while(count < 2 && retry < 3); + } while(res >= 0 && count < 2 && retry < 3); if (retry >= 3) ndbout << "get backup event failed for " << retry << " times" << endl;