MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:knielsen Date:July 6 2006 9:49pm
Subject:bk commit into 5.0 tree (knielsen:1.2201) BUG#19951
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of knielsen. When knielsen 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.2201 06/07/06 23:49:09 knielsen@ymer.(none) +2 -0
  BUG#19951: Race conditions in test wait_timeout.
  
  Fix random failures in test 'wait_timeout' that depend on exact timing.
  
  1. Force a reconnect initially if necessary, as otherwise slow startup
  might have caused a connection timeout before the test can even start.
  
  2. Explicitly disconnect the first connection to remove confusion about
  which connection aborts from timeout, causing test failure.

  mysql-test/t/wait_timeout.test
    1.7 06/07/06 23:49:05 knielsen@ymer.(none) +9 -3
    Fix two races in test.

  mysql-test/r/wait_timeout.result
    1.3 06/07/06 23:49:05 knielsen@ymer.(none) +4 -0
    Fix two races in test.

# 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:	knielsen
# Host:	ymer.(none)
# Root:	/usr/local/mysql/mysql-5.0-bug19951

--- 1.2/mysql-test/r/wait_timeout.result	2006-02-16 12:02:34 +01:00
+++ 1.3/mysql-test/r/wait_timeout.result	2006-07-06 23:49:05 +02:00
@@ -1,3 +1,7 @@
+select 0;
+0
+0
+flush status;
 select 1;
 1
 1

--- 1.6/mysql-test/t/wait_timeout.test	2006-06-24 13:11:06 +02:00
+++ 1.7/mysql-test/t/wait_timeout.test	2006-07-06 23:49:05 +02:00
@@ -9,16 +9,20 @@
 # Connect with another connection and reset counters
 --disable_query_log
 connect (wait_con,localhost,root,,test,,);
-flush status; # Reset counters
 connection wait_con;
 set session wait_timeout=100;
 let $retries=300;
-let $aborted_clients = `SHOW STATUS LIKE 'aborted_clients'`;
 set @aborted_clients= 0;
 --enable_query_log
 
 # Disable reconnect and do the query
 connection default;
+# If slow host (Valgrind...), we may have already timed out here.
+# So force a reconnect if necessary, using a dummy query. And issue a
+# 'flush status' to reset the 'aborted_clients' counter.
+--enable_reconnect
+select 0;
+flush status;
 --disable_reconnect
 select 1;
 
@@ -46,6 +50,9 @@
 select 2;
 --enable_reconnect
 select 3;
+# Disconnect so that we will not be confused by a future abort from this
+# connection.
+disconnect default
 
 #
 # Do the same test as above on a TCP connection
@@ -56,7 +63,6 @@
 connection wait_con;
 flush status; # Reset counters
 let $retries=300;
-let $aborted_clients = `SHOW STATUS LIKE 'aborted_clients'`;
 set @aborted_clients= 0;
 --enable_query_log
 
Thread
bk commit into 5.0 tree (knielsen:1.2201) BUG#19951knielsen6 Jul