summaryrefslogtreecommitdiff
path: root/mysql-test/t/lock.test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2018-11-03 14:24:15 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2018-11-03 14:24:15 +0400
commit6472c5c015a174ffd680fddc8f20c7a94684a552 (patch)
tree171357b96cf3025ee09092547ee34f060a62381e /mysql-test/t/lock.test
parent1a89356382cc1b19d878e6a29163eecc8605f414 (diff)
downloadmariadb-git-6472c5c015a174ffd680fddc8f20c7a94684a552.tar.gz
MDEV-15890 Strange error message if you try to FLUSH TABLES <view> after LOCK TABLES <view>.
LOCK view WRITE shouldn't block FLUSH view. So we set the view's mdl_request type to it's tables.
Diffstat (limited to 'mysql-test/t/lock.test')
-rw-r--r--mysql-test/t/lock.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test
index 6cfaf9fc320..734fcd8e626 100644
--- a/mysql-test/t/lock.test
+++ b/mysql-test/t/lock.test
@@ -192,7 +192,7 @@ drop view v_bug5719;
select * from t1;
unlock tables;
create or replace view v_bug5719 as select * from t1;
-lock tables v_bug5719 write;
+lock tables v_bug5719 read;
select * from v_bug5719;
--echo
--echo Allowed to use an underlying table under LOCK TABLES <view>
@@ -370,7 +370,7 @@ create table t2 (j int);
--echo #
--echo # Try to perform DDL on table which is locked through view.
create view v1 as select * from t2;
-lock tables t1 write, v1 write;
+lock tables t1 write, v1 read;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
flush table t2;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE