Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-12882 - Assertion failed in MDL_context::upgrade_shared_lock
Relaxed assertion (in MySQL it was removed). For "LOCK TABLES t1 WRITE CONCURRENT, t1 READ" upgrade lock to weakest existing suitable lock, which is MDL_SHARED_NO_READ_WRITE.
- Loading branch information
Sergey Vojtovich
committed
Jun 26, 2017
1 parent
0d69d31
commit dd710e7
Showing
4 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # | ||
| # MDEV-12882 - Assertion `mdl_ticket->m_type == MDL_SHARED_UPGRADABLE || | ||
| # mdl_ticket->m_type == MDL_SHARED_NO_WRITE || | ||
| # mdl_ticket->m_type == MDL_SHARED_NO_READ_WRITE || | ||
| # mdl_ticket->m_type == MDL_SHARED_READ' | ||
| # failed in MDL_context::upgrade_shared_lock | ||
| # | ||
| CREATE TABLE t1(a INT) ENGINE=InnoDB; | ||
| LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ; | ||
| SELECT * FROM information_schema.metadata_lock_info; | ||
| THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME | ||
| 9 MDL_INTENTION_EXCLUSIVE NULL Global read lock | ||
| 9 MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1 | ||
| UNLOCK TABLES; | ||
| LOCK TABLES t1 AS t2 READ, t1 WRITE CONCURRENT; | ||
| SELECT * FROM information_schema.metadata_lock_info; | ||
| THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME | ||
| 9 MDL_INTENTION_EXCLUSIVE NULL Global read lock | ||
| 9 MDL_SHARED_WRITE NULL Table metadata lock test t1 | ||
| 9 MDL_SHARED_READ_ONLY NULL Table metadata lock test t1 | ||
| UNLOCK TABLES; | ||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 * FROM information_schema.metadata_lock_info; | ||
| UNLOCK TABLES; | ||
| LOCK TABLES t1 AS t2 READ, t1 WRITE CONCURRENT; | ||
| SELECT * FROM information_schema.metadata_lock_info; | ||
| UNLOCK TABLES; | ||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters