summaryrefslogtreecommitdiff
path: root/mysql-test/suite/handler/interface.test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-04-01 14:07:02 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-04-01 14:07:02 +0400
commit334e7c9bccbc6892efbb35f5930f80ccf1d770a8 (patch)
tree7ddc38e5c776a4f82c9a9731f8d6d3a79103eef0 /mysql-test/suite/handler/interface.test
parentcbc5157feb9801310e458f7ed10983ad478c881e (diff)
downloadmariadb-git-bb-mdev7895.tar.gz
MDEV-7895 - HANDLER READ doesn't upgrade metadata lock from S to SRbb-mdev7895
Change code for HANDLER READ statements to upgrade S metadata lock to SR metadata lock for the duration of read. This allows us properly isolate HANDLER READ from LOCK TABLES WRITE and makes metadata locking for these statements consistent with locking for other DML. HANDLER-related tests had to be adjusted to take into account that HANDLER READ will wait for and acquire SR lock.
Diffstat (limited to 'mysql-test/suite/handler/interface.test')
-rw-r--r--mysql-test/suite/handler/interface.test8
1 files changed, 2 insertions, 6 deletions
diff --git a/mysql-test/suite/handler/interface.test b/mysql-test/suite/handler/interface.test
index 2ef617c3ce7..4deaecd6ea8 100644
--- a/mysql-test/suite/handler/interface.test
+++ b/mysql-test/suite/handler/interface.test
@@ -333,8 +333,7 @@ connection con1;
--reap
unlock tables;
drop table t1;
---echo # Now test case which was reported originally but which no longer
---echo # triggers execution path which has caused the problem.
+--echo # Now test case which was reported originally.
connection default;
create table t1 (a int not null);
insert into t1 values (1);
@@ -348,10 +347,7 @@ let $wait_condition=
info = "alter table t1 engine=csv";
--source include/wait_condition.inc
connection default;
---echo # Since S metadata lock was already acquired at HANDLER OPEN time
---echo # and TL_READ lock requested by HANDLER READ is compatible with
---echo # ALTER's TL_WRITE_ALLOW_READ the below statement should succeed
---echo # without waiting. The old version of table should be used in it.
+--error ER_ILLEGAL_HA
handler t1 read next;
handler t1 close;
connection con1;