summaryrefslogtreecommitdiff
path: root/mysql-test/main/mdl.test
blob: b90c74a8f7fc6c8a39726920b01be04e00470af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--source include/have_metadata_lock_info.inc
--source include/have_innodb.inc

--echo #
--echo # MDEV-12882 - Assertion `mdl_ticket->m_type == MDL_SHARED_UPGRADABLE ||
--echo #                         mdl_ticket->m_type == MDL_SHARED_NO_WRITE ||
--echo #                         mdl_ticket->m_type == MDL_SHARED_NO_READ_WRITE ||
--echo #                         mdl_ticket->m_type == MDL_SHARED_READ'
--echo #                         failed in MDL_context::upgrade_shared_lock
--echo #

CREATE TABLE t1(a INT) ENGINE=InnoDB;
LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
UNLOCK TABLES;
LOCK TABLES t1 AS t2 READ, t1 WRITE CONCURRENT;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
UNLOCK TABLES;
DROP TABLE t1;