From: Date: July 15 2005 2:31am Subject: bk commit into 5.0 tree (tomas:1.1934) BUG#11898 List-Archive: http://lists.mysql.com/internals/27134 X-Bug: 11898 Message-Id: <20050715003124.C79BD1F311B@poseidon.mysql.com> 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 1.1934 05/07/15 02:31:13 tomas@stripped +1 -0 merge, adopted structured event interface to filter out "PING" events c.f. BUG#11898, ndb_mgmd does not release resources ndb/src/mgmapi/ndb_logevent.cpp 1.4 05/07/15 02:31:07 tomas@stripped +20 -1 merge, adopted structured event interface to filter out "PING" events c.f. BUG#11898, ndb_mgmd does not release resources # 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.0 --- 1.3/ndb/src/mgmapi/ndb_logevent.cpp 2005-01-25 13:08:11 +01:00 +++ 1.4/ndb/src/mgmapi/ndb_logevent.cpp 2005-07-15 02:31:07 +02:00 @@ -369,6 +369,9 @@ Properties p; char buf[256]; + struct timeval start_time; + gettimeofday(&start_time, 0); + /* header */ while (1) { if (in.gets(buf,sizeof(buf)) == 0) @@ -383,7 +386,23 @@ } if ( strcmp("log event reply\n", buf) == 0 ) break; - ndbout_c("skipped: %s", buf); + + if ( strcmp("\n", buf) ) + ndbout_c("skipped: %s", buf); + + struct timeval now; + gettimeofday(&now, 0); + unsigned elapsed_ms= + (now.tv_sec-start_time.tv_sec)*1000 + + (now.tv_usec-start_time.tv_usec)/1000; + + if (elapsed_ms >= timeout_in_milliseconds) + { + // timed out + return 0; + } + + new (&in) SocketInputStream(h->socket, timeout_in_milliseconds-elapsed_ms); } /* read name-value pairs into properties object */