#At file:///home2/mydev/bzrroot/mysql-6.0-bug38070-1/ based on revid:charles.bell@stripped
2790 Ingo Struewing 2009-03-06
Bug#38070 - rpl_locktrans_innodb Lock wait timeout exceeded At line 632
The test case rpl_locktrans_innodb failed sporadically.
A lock wait timed out on slow machines.
Instead of just increasing the timeouts, two tests do now allow timeouts
to happen. This does not invalidate the purpose of the tests. Please find
detailed explanation in the test script.
@ mysql-test/include/locktrans.inc
Bug#38070 - rpl_locktrans_innodb Lock wait timeout exceeded At line 632
Changed two tests to allow for lock wait timeout.
@ mysql-test/r/locktrans_innodb.result
Bug#38070 - rpl_locktrans_innodb Lock wait timeout exceeded At line 632
Updated test result.
@ mysql-test/suite/rpl/r/rpl_locktrans_innodb.result
Bug#38070 - rpl_locktrans_innodb Lock wait timeout exceeded At line 632
Updated test result.
modified:
mysql-test/include/locktrans.inc
mysql-test/r/locktrans_innodb.result
mysql-test/suite/rpl/r/rpl_locktrans_innodb.result
=== modified file 'mysql-test/include/locktrans.inc'
--- a/mysql-test/include/locktrans.inc 2008-05-23 13:54:03 +0000
+++ b/mysql-test/include/locktrans.inc 2009-03-06 11:57:53 +0000
@@ -629,7 +629,18 @@ UNLOCK TABLES;
UNLOCK TABLES;
--echo # connection conn2.
connection conn2;
- --echo # Now the READ lock is taken.
+ --echo # Now the READ lock is taken (or timed out).
+ #
+ # On some machines the read lock timed out due to high system load.
+ # The goal of this test is to prove that a pending WRITE lock
+ # takes precedence over a pending READ lock. If the test arrives
+ # here, the proof is achieved, even if the read lock timed out.
+ # If the READ lock would take precedence, it would be granted
+ # immediately. Since conn1's read lock is unlocked only, the
+ # WRITE lock request would time out on conn2's READ lock.
+ # Hence it is safe to ignore a timeout on conn2's READ lock here.
+ #
+ --error 0, ER_LOCK_WAIT_TIMEOUT
reap;
--echo # Select from the table.
SELECT * FROM t1;
@@ -684,7 +695,18 @@ UNLOCK TABLES;
UNLOCK TABLES;
--echo # connection conn2.
connection conn2;
- --echo # Now the READ lock is taken.
+ --echo # Now the READ lock is taken (or timed out).
+ #
+ # On some machines the read lock timed out due to high system load.
+ # The goal of this test is to prove that a pending WRITE lock
+ # takes precedence over a pending READ lock. If the test arrives
+ # here, the proof is achieved, even if the read lock timed out.
+ # If the READ lock would take precedence, it would be granted
+ # immediately. Since conn1's read lock is unlocked only, the
+ # WRITE lock request would time out on conn2's READ lock.
+ # Hence it is safe to ignore a timeout on conn2's READ lock here.
+ #
+ --error 0, ER_LOCK_WAIT_TIMEOUT
reap;
--echo # Select from the table.
SELECT * FROM t1;
=== modified file 'mysql-test/r/locktrans_innodb.result'
--- a/mysql-test/r/locktrans_innodb.result 2008-12-24 10:48:24 +0000
+++ b/mysql-test/r/locktrans_innodb.result 2009-03-06 11:57:53 +0000
@@ -559,7 +559,7 @@ INSERT INTO t1 VALUES(1111);
# Unlock table.
UNLOCK TABLES;
# connection conn2.
-# Now the READ lock is taken.
+# Now the READ lock is taken (or timed out).
# Select from the table.
SELECT * FROM t1;
c1
@@ -598,7 +598,7 @@ INSERT INTO t1 VALUES(1111);
# Unlock table.
UNLOCK TABLES;
# connection conn2.
-# Now the READ lock is taken.
+# Now the READ lock is taken (or timed out).
# Select from the table.
SELECT * FROM t1;
c1
=== modified file 'mysql-test/suite/rpl/r/rpl_locktrans_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_locktrans_innodb.result 2009-01-26 16:03:39 +0000
+++ b/mysql-test/suite/rpl/r/rpl_locktrans_innodb.result 2009-03-06 11:57:53 +0000
@@ -565,7 +565,7 @@ INSERT INTO t1 VALUES(1111);
# Unlock table.
UNLOCK TABLES;
# connection conn2.
-# Now the READ lock is taken.
+# Now the READ lock is taken (or timed out).
# Select from the table.
SELECT * FROM t1;
c1
@@ -604,7 +604,7 @@ INSERT INTO t1 VALUES(1111);
# Unlock table.
UNLOCK TABLES;
# connection conn2.
-# Now the READ lock is taken.
+# Now the READ lock is taken (or timed out).
# Select from the table.
SELECT * FROM t1;
c1
Attachment: [text/bzr-bundle] bzr/ingo.struewing@sun.com-20090306115753-yg05d0jaumg14sf2.bundle
| Thread |
|---|
| • bzr commit into mysql-6.0-backup branch (ingo.struewing:2790) Bug#38070 | Ingo Struewing | 6 Mar |