From: Tor Didriksen Date: December 17 2010 10:08am Subject: bzr push into mysql-trunk-bugfixing branch (tor.didriksen:3444 to 3445) List-Archive: http://lists.mysql.com/commits/127158 Message-Id: <20101217100822.5E62533E6@atum07.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3445 Tor Didriksen 2010-12-17 fix compile warnings modified: sql/filesort.cc 3444 Dao-Gang.Qu@stripped 2010-12-17 Bug #57918 rpl_get_master_version_and_clock times out sporadically The reason is that sometimes the slave is unblocked before the master server is really shutdown. Symptom 1, found warnings/errors in server log file. In the situation, the 'get_master_version_and_clock' func will return normally instead of network error expected. Then the 'handle_slave_io' func will go to invoke 'get_master_uuid' func, which will return normally if the master server is still alive. Then the process will go on until invoke 'request_dump' func, which will print the "Error on COM_BINLOG_DUMP: 2003 Can't connect to MySQL server on '127.0.0.1' (111), will retry in 1 secs" error as symptom reported if the server is really shutdown in the moment, while the test is waiting for the network error. Symptom 2, timeout after 900 seconds In the situation, the 'get_master_version_and_clock', get_master_uuid, and 'request_dump' funcs will return normally if the master server is alive during the period, then the 'handle_slave_io' func will enter 'while (!io_slave_killed(thd,mi))' block and exit with error when fail to reconnect master, which is really shutdown at that time. Then the test will not have a chance to start master, because during the period it will stall there to wait for a network error until it exits with a timeout error. To fix these problems, we source wait_until_disconnected.inc after shutdown master server for guaranteeing the master server is really shutdown before the slave is unblocked. @ mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test Update test to guarantee the master server is really shutdown before the slave is unblocked. modified: mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test === modified file 'sql/filesort.cc' --- a/sql/filesort.cc 2010-12-17 09:41:21 +0000 +++ b/sql/filesort.cc 2010-12-17 10:06:29 +0000 @@ -1154,13 +1154,13 @@ bool check_if_pq_applicable(Sort_param * if (param->max_rows == HA_POS_ERROR) { DBUG_PRINT("info", ("No LIMIT")); - DBUG_RETURN(NULL); + DBUG_RETURN(false); } if (param->max_rows + 2 >= UINT_MAX) { DBUG_PRINT("info", ("Too large LIMIT")); - DBUG_RETURN(NULL); + DBUG_RETURN(false); } ulong num_available_keys= No bundle (reason: useless for push emails).