mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -648,9 +648,6 @@ set debug_sync= 'RESET';
|
||||
set @old_general_log = @@global.general_log;
|
||||
set @@global.general_log= OFF;
|
||||
create table t1 (i int) engine=InnoDB;
|
||||
# We have to use view in order to make LOCK TABLES avoid
|
||||
# acquiring SNRW metadata lock on table.
|
||||
create view v1 as select * from t1;
|
||||
insert into t1 values (1);
|
||||
# Prepare user lock which will be used for resuming execution of
|
||||
# the first statement after it acquires TL_WRITE_ALLOW_WRITE lock.
|
||||
@ -673,7 +670,7 @@ select count(*) > 0 from t1 as a, t1 as b for update;;
|
||||
# acquiring lock for the the first instance of 't1'.
|
||||
set debug_sync= 'now WAIT_FOR parked';
|
||||
# Send LOCK TABLE statement which will try to get TL_WRITE lock on 't1':
|
||||
lock table v1 write;;
|
||||
lock table t1 write concurrent;;
|
||||
# Switch to connection 'default'.
|
||||
# Wait until this LOCK TABLES statement starts waiting for table lock.
|
||||
# Allow SELECT ... FOR UPDATE to resume.
|
||||
@ -703,7 +700,6 @@ unlock tables;
|
||||
# Do clean-up.
|
||||
set debug_sync= 'RESET';
|
||||
set @@global.general_log= @old_general_log;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#50821 Deadlock between LOCK TABLES and ALTER TABLE
|
||||
|
Reference in New Issue
Block a user