diff options
author | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-01-15 12:47:22 +0100 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-01-15 12:47:22 +0100 |
commit | 2a340691ff3839a37094f139a5c419b7d4007cb8 (patch) | |
tree | f3e9005e0768dfa3e5bf05c1a6ea0c4390051cb1 /mysql-test/r/lock.result | |
parent | ad6adb1398e08ffa92dd9bce26b04cdf747ff312 (diff) | |
download | mariadb-git-2a340691ff3839a37094f139a5c419b7d4007cb8.tar.gz |
Bug #43685 Lock table affects other non-related tables
The problem was that FLUSH TABLE <table_list> would block,
waiting for all tables with old versions to be removed from
the table definition cache, rather than waiting for only
the tables in <table_list>. This could happen if FLUSH TABLE
was used in combination with LOCK TABLES.
With the new MDL code, this problem is no longer repeatable.
Regression test case added to lock.test. This commit contains
no code changes.
Diffstat (limited to 'mysql-test/r/lock.result')
-rw-r--r-- | mysql-test/r/lock.result | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index 348412ea441..5dbfa66b43e 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -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. # |