List:Commits« Previous MessageNext Message »
From:knielsen Date:July 5 2006 8:01am
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/05 10:01:24 knielsen@stripped +2 -0
  BUG#19951: Race conditions in test wait_timeout.
  
  Fix random failures in test 'wait_timeout' that depend on exact timing.
  
  1. Reset the connection timeout just before using the connection, 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/05 10:01:20 knielsen@stripped +8 -3
    Fix two races in test.

  mysql-test/r/wait_timeout.result
    1.3 06/07/05 10:01:20 knielsen@stripped +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:	rt.int.sifira.dk
# Root:	/usr/local/mysql/mysql-5.0-bugxxx

--- 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-05 10:01:20 +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-05 10:01:20 +02:00
@@ -9,16 +9,19 @@
 # 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 reset the timeout first.
+--enable_reconnect
+select 0;
+flush status; # Reset counters
 --disable_reconnect
 select 1;
 
@@ -46,6 +49,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 +62,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#19951knielsen5 Jul