MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:July 2 2009 2:24pm
Subject:bzr commit into mysql-5.4 branch (jon.hauglid:2822) Bug#45066
View as plain text  
#At file:///export/home/z/mysql-azalea-bugfixing-bug45066/ based on revid:alik@stripped

 2822 Jon Olav Hauglid	2009-07-02
      Bug #45066 FLUSH TABLES WITH READ LOCK deadlocks against LOCK TABLE
      
      Test coverage for combinations of LOCK TABLE READ / WRITE and 
      FLUSH TABLES / FLUSH TABLES WITH READ LOCK added to lock.test.
      LOCK and FLUSH are executed sequentially from one connection.

    modified:
      mysql-test/r/lock.result
      mysql-test/t/lock.test
=== modified file 'mysql-test/r/lock.result'
--- a/mysql-test/r/lock.result	2009-03-27 22:06:26 +0000
+++ b/mysql-test/r/lock.result	2009-07-02 14:24:05 +0000
@@ -282,5 +282,27 @@ insert into t1 values (1);
 # Ensure that metadata locks held by the transaction are released.
 drop table t1;
 #
+# Bug#45066 FLUSH TABLES WITH READ LOCK deadlocks against 
+#           LOCK TABLE 
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+FLUSH TABLES;
+ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
+LOCK TABLE t1 WRITE;
+FLUSH TABLES;
+#
+# If you allow the next combination, you reintroduce bug Bug#45066
+# 
+LOCK TABLE t1 READ;
+FLUSH TABLES WITH READ LOCK;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+LOCK TABLE t1 WRITE;
+FLUSH TABLES WITH READ LOCK;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+UNLOCK TABLES;
+DROP TABLE t1;
+#
 # End of 6.0 tests.
 #

=== modified file 'mysql-test/t/lock.test'
--- a/mysql-test/t/lock.test	2009-03-27 22:06:26 +0000
+++ b/mysql-test/t/lock.test	2009-07-02 14:24:05 +0000
@@ -345,5 +345,37 @@ connection default;
 drop table t1;
 
 --echo #
+--echo # Bug#45066 FLUSH TABLES WITH READ LOCK deadlocks against 
+--echo #           LOCK TABLE 
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT);
+
+LOCK TABLE t1 READ;
+--error ER_TABLE_NOT_LOCKED_FOR_WRITE
+FLUSH TABLES;
+
+LOCK TABLE t1 WRITE;
+FLUSH TABLES;
+
+--echo #
+--echo # If you allow the next combination, you reintroduce bug Bug#45066
+--echo # 
+LOCK TABLE t1 READ;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+FLUSH TABLES WITH READ LOCK;
+
+LOCK TABLE t1 WRITE;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+FLUSH TABLES WITH READ LOCK;
+
+UNLOCK TABLES;
+DROP TABLE t1;
+
+--echo #
 --echo # End of 6.0 tests.
 --echo #


Attachment: [text/bzr-bundle] bzr/jon.hauglid@sun.com-20090702142405-igsopqwzt6lkqxsn.bundle
Thread
bzr commit into mysql-5.4 branch (jon.hauglid:2822) Bug#45066Jon Olav Hauglid2 Jul
  • Re: bzr commit into mysql-5.4 branch (jon.hauglid:2822) Bug#45066Konstantin Osipov2 Jul