diff options
Diffstat (limited to 'mysql-test/r/lock.result')
-rw-r--r-- | mysql-test/r/lock.result | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index 501c379b257..381667745d8 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -272,20 +272,24 @@ drop view v1; # drop table if exists t1; create table t1 (a int); +connect con1,localhost,root,,; set autocommit= 0; insert into t1 values (1); lock table t1 write; -# Disconnect # Ensure that metadata locks will be released if there is an open # transaction (autocommit=off) in conjunction with lock tables. +disconnect con1; +connection default; drop table t1; # Same problem but now for BEGIN drop table if exists t1; create table t1 (a int); +connect con1,localhost,root,,; begin; insert into t1 values (1); -# Disconnect # Ensure that metadata locks held by the transaction are released. +disconnect con1; +connection default; drop table t1; # # Coverage for situations when we try to execute DDL on tables @@ -451,32 +455,42 @@ DROP TABLE t1; # Bug#43685 Lock table affects other non-related tables # DROP TABLE IF EXISTS t1, t2; +connect con2, localhost, root; CREATE TABLE t1 (id INT); CREATE TABLE t2 (id INT); -# Connection default +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 +connection con2; LOCK TABLE t2 WRITE; # This used to hang until the first connection # unlocked t1. FLUSH TABLE t2; UNLOCK TABLES; -# Connection default +connection default; UNLOCK TABLES; DROP TABLE t1, t2; +disconnect con2; # # End of 6.0 tests. # create table t1 (a int) engine=myisam; lock tables t1 write concurrent, t1 as t2 read; +connect con1,localhost,root,,; +connection con1; lock tables t1 read local; unlock tables; +connection default; unlock tables; +connection con1; lock tables t1 read local; +connection default; lock tables t1 write concurrent, t1 as t2 read; unlock tables; +connection con1; unlock tables; +disconnect con1; +connection default; drop table t1; |