mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 06:01:31 +03:00
MDEV-19273: Server crash in MDL_ticket::has_stronger_or_equal_type or Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db.str, table->table_name.str, MDL_SHARED)' failed in mysql_rm_table_no_locks
Early report error in case of DROP SEQUENCE <non-sequence> Do not use error variable for other purposes except error.
This commit is contained in:
@ -666,7 +666,7 @@ create temporary sequence s;
|
||||
drop temporary table s;
|
||||
create temporary table s (i int);
|
||||
drop temporary sequence s;
|
||||
ERROR 42S02: Unknown SEQUENCE: 'test.s'
|
||||
ERROR 42S02: 'test.s' is not a SEQUENCE
|
||||
drop table s;
|
||||
#
|
||||
# MDEV-15115 Assertion failure in CREATE SEQUENCE...ROW_FORMAT=REDUNDANT
|
||||
|
@ -489,7 +489,7 @@ drop table s;
|
||||
create temporary sequence s;
|
||||
drop temporary table s;
|
||||
create temporary table s (i int);
|
||||
--error ER_UNKNOWN_SEQUENCES
|
||||
--error ER_NOT_SEQUENCE2
|
||||
drop temporary sequence s;
|
||||
drop table s;
|
||||
|
||||
|
@ -300,4 +300,63 @@ update t1 set p_first_name='Yunxi' where p_id=1;
|
||||
drop view v2;
|
||||
drop table t1,t2;
|
||||
drop sequence s1;
|
||||
#
|
||||
# MDEV-19273:Server crash in MDL_ticket::has_stronger_or_equal_type or
|
||||
# Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE,
|
||||
# table->db.str, table->table_name.str, MDL_SHARED)' failed
|
||||
# in mysql_rm_table_no_locks
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TEMPORARY TABLE tmp (b INT);
|
||||
LOCK TABLE t1 READ;
|
||||
DROP SEQUENCE tmp;
|
||||
ERROR 42S02: 'test.tmp' is not a SEQUENCE
|
||||
DROP TEMPORARY SEQUENCE tmp;
|
||||
ERROR 42S02: 'test.tmp' is not a SEQUENCE
|
||||
DROP SEQUENCE t1;
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
DROP TEMPORARY SEQUENCE t1;
|
||||
ERROR 42S02: Unknown SEQUENCE: 'test.t1'
|
||||
UNLOCK TABLES;
|
||||
DROP SEQUENCE t1;
|
||||
ERROR 42S02: 'test.t1' is not a SEQUENCE
|
||||
DROP TEMPORARY SEQUENCE t1;
|
||||
ERROR 42S02: Unknown SEQUENCE: 'test.t1'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t (a INT);
|
||||
CREATE TEMPORARY TABLE s (f INT);
|
||||
CREATE SEQUENCE s;
|
||||
LOCK TABLE t WRITE;
|
||||
DROP SEQUENCE s;
|
||||
ERROR 42S02: 'test.s' is not a SEQUENCE
|
||||
DROP TEMPORARY SEQUENCE s;
|
||||
ERROR 42S02: 'test.s' is not a SEQUENCE
|
||||
UNLOCK TABLES;
|
||||
CREATE TEMPORARY SEQUENCE s;
|
||||
LOCK TABLE t WRITE;
|
||||
DROP TEMPORARY SEQUENCE s;
|
||||
UNLOCK TABLES;
|
||||
DROP TEMPORARY TABLE s;
|
||||
DROP SEQUENCE s;
|
||||
create table s(a INT);
|
||||
CREATE TEMPORARY TABLE s (f INT);
|
||||
LOCK TABLE t WRITE;
|
||||
DROP TEMPORARY TABLE s;
|
||||
CREATE TEMPORARY TABLE s (f INT);
|
||||
DROP TABLE s;
|
||||
DROP TABLE s;
|
||||
ERROR HY000: Table 's' was not locked with LOCK TABLES
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE s;
|
||||
CREATE VIEW v1 as SELECT * FROM t;
|
||||
CREATE SEQUENCE s;
|
||||
DROP SEQUENCE IF EXISTS v1;
|
||||
Warnings:
|
||||
Note 4091 Unknown SEQUENCE: 'test.v1'
|
||||
DROP VIEW IF EXISTS s;
|
||||
Warnings:
|
||||
Note 4092 Unknown VIEW: 'test.s'
|
||||
DROP VIEW v1;
|
||||
DROP SEQUENCE s;
|
||||
DROP TABLE t;
|
||||
# End of 10.3 tests
|
||||
|
@ -315,4 +315,68 @@ drop view v2;
|
||||
drop table t1,t2;
|
||||
drop sequence s1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19273:Server crash in MDL_ticket::has_stronger_or_equal_type or
|
||||
--echo # Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE,
|
||||
--echo # table->db.str, table->table_name.str, MDL_SHARED)' failed
|
||||
--echo # in mysql_rm_table_no_locks
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TEMPORARY TABLE tmp (b INT);
|
||||
LOCK TABLE t1 READ;
|
||||
--error ER_NOT_SEQUENCE2
|
||||
DROP SEQUENCE tmp;
|
||||
--error ER_NOT_SEQUENCE2
|
||||
DROP TEMPORARY SEQUENCE tmp;
|
||||
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||
DROP SEQUENCE t1;
|
||||
--error ER_UNKNOWN_SEQUENCES
|
||||
DROP TEMPORARY SEQUENCE t1;
|
||||
UNLOCK TABLES;
|
||||
--error ER_NOT_SEQUENCE2
|
||||
DROP SEQUENCE t1;
|
||||
--error ER_UNKNOWN_SEQUENCES
|
||||
DROP TEMPORARY SEQUENCE t1;
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
CREATE TABLE t (a INT);
|
||||
CREATE TEMPORARY TABLE s (f INT);
|
||||
CREATE SEQUENCE s;
|
||||
LOCK TABLE t WRITE;
|
||||
--error ER_NOT_SEQUENCE2
|
||||
DROP SEQUENCE s;
|
||||
--error ER_NOT_SEQUENCE2
|
||||
DROP TEMPORARY SEQUENCE s;
|
||||
UNLOCK TABLES;
|
||||
CREATE TEMPORARY SEQUENCE s;
|
||||
LOCK TABLE t WRITE;
|
||||
DROP TEMPORARY SEQUENCE s;
|
||||
UNLOCK TABLES;
|
||||
DROP TEMPORARY TABLE s;
|
||||
DROP SEQUENCE s;
|
||||
|
||||
create table s(a INT);
|
||||
CREATE TEMPORARY TABLE s (f INT);
|
||||
LOCK TABLE t WRITE;
|
||||
DROP TEMPORARY TABLE s;
|
||||
CREATE TEMPORARY TABLE s (f INT);
|
||||
DROP TABLE s;
|
||||
--error ER_TABLE_NOT_LOCKED
|
||||
DROP TABLE s;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE s;
|
||||
|
||||
CREATE VIEW v1 as SELECT * FROM t;
|
||||
CREATE SEQUENCE s;
|
||||
|
||||
DROP SEQUENCE IF EXISTS v1;
|
||||
DROP VIEW IF EXISTS s;
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP SEQUENCE s;
|
||||
DROP TABLE t;
|
||||
--echo # End of 10.3 tests
|
||||
|
Reference in New Issue
Block a user