1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19198 - DBUG assert in CREATE IF NOT EXIST under LOCK TABLES WRITE

Fixed the ASSERT to take care of the case when table already existed.
This commit is contained in:
Monty
2021-04-29 17:40:32 +03:00
committed by Sergei Golubchik
parent 0bc3a0801c
commit 0b59320d3d
3 changed files with 51 additions and 8 deletions

View File

@ -651,3 +651,28 @@ DROP TABLE t;
--echo #
--echo # End of 10.5 tests
--echo #
--echo #
--echo # MDEV-19198 Assertion `(create_info->tmp_table()) || ....`
--echo # failed in mysql_create_like_table
--echo #
CREATE TABLE t1 (c INT);
CREATE TABLE t2 (c INT);
LOCK TABLES t1 WRITE, t2 READ;
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
UNLOCK TABLES;
LOCK TABLES t1 READ , t2 READ;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
UNLOCK TABLES;
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
DROP TABLES t1,t2;
--echo #
--echo # End of 10.6 tests
--echo #