MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:January 15 2010 11:49am
Subject:bzr commit into mysql-6.0-codebase branch (jon.hauglid:3751)
View as plain text  
#At file:///export/home/z/mysql-6.0-codebase-4284-mytest/ based on revid:jon.hauglid@stripped

 3751 Jon Olav Hauglid	2010-01-15 [merge]
      merge from mysql-next-4284.

    modified:
      mysql-test/r/lock.result
      mysql-test/t/lock.test
=== modified file 'mysql-test/r/lock.result'
--- a/mysql-test/r/lock.result	2010-01-08 13:28:06 +0000
+++ b/mysql-test/r/lock.result	2010-01-15 11:49:12 +0000
@@ -369,5 +369,25 @@ INSERT INTO t1(f1) VALUES(0);
 ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
 DROP TABLE t1;
 #
+# Bug#43685 Lock table affects other non-related tables
+#
+DROP TABLE IF EXISTS t1, t2;
+CREATE TABLE t1 (id INT);
+CREATE TABLE t2 (id INT);
+# Connection default
+LOCK TABLE t1 WRITE;
+ANALYZE TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	analyze	status	Table is already up to date
+# Connection con2
+LOCK TABLE t2 WRITE;
+# This used to hang until the first connection
+# unlocked t1.
+FLUSH TABLE t2;
+UNLOCK TABLES;
+# Connection default
+UNLOCK TABLES;
+DROP TABLE t1, t2;
+#
 # End of 6.0 tests.
 #

=== modified file 'mysql-test/t/lock.test'
--- a/mysql-test/t/lock.test	2010-01-08 13:28:06 +0000
+++ b/mysql-test/t/lock.test	2010-01-15 11:49:12 +0000
@@ -2,6 +2,9 @@
 # Testing of table locking
 #
 
+# Save the initial number of concurrent sessions.
+--source include/count_sessions.inc
+
 --disable_warnings
 drop table if exists t1,t2,t3;
 --enable_warnings
@@ -462,5 +465,42 @@ DROP TABLE t1;
 
 
 --echo #
+--echo # Bug#43685 Lock table affects other non-related tables
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+--enable_warnings
+
+connect (con2, localhost, root);
+CREATE TABLE t1 (id INT);
+CREATE TABLE t2 (id INT);
+
+--echo # Connection default
+connection default;
+LOCK TABLE t1 WRITE;
+ANALYZE TABLE t1;
+
+--echo # Connection con2
+connection con2;
+LOCK TABLE t2 WRITE;
+--echo # This used to hang until the first connection
+--echo # unlocked t1.
+FLUSH TABLE t2;
+
+UNLOCK TABLES;
+
+--echo # Connection default
+connection default;
+UNLOCK TABLES;
+DROP TABLE t1, t2;
+disconnect con2;
+
+
+--echo #
 --echo # End of 6.0 tests.
 --echo #
+
+# Check that all connections opened by test cases in this file are really
+# gone so execution of other tests won't be affected by their presence.
+--source include/wait_until_count_sessions.inc


Attachment: [text/bzr-bundle] bzr/jon.hauglid@sun.com-20100115114912-d7w1m5oeb6mktu86.bundle
Thread
bzr commit into mysql-6.0-codebase branch (jon.hauglid:3751) Jon Olav Hauglid15 Jan