mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-15970 Crash when doing truncate on locked sequence
Problem was that we used table->s->db_type() for accessing handlerton of opened file instead of table->file->ht Other bug fixed: - Ensure that we set error if reopen_tables() fails (This was the cause of assert)
This commit is contained in:
@ -32,3 +32,8 @@ CREATE SEQUENCE seq2;
|
||||
LOCK TABLE seq1 WRITE, seq2 WRITE;
|
||||
INSERT INTO seq1 VALUES (1, 1, 100000, 1, 1, 100, 1, 1);
|
||||
DROP SEQUENCE seq1, seq2;
|
||||
CREATE OR REPLACE SEQUENCE s1 ENGINE=MyISAM;
|
||||
LOCK TABLE s1 WRITE;
|
||||
TRUNCATE TABLE s1;
|
||||
ERROR HY000: Storage engine SEQUENCE of the table `test`.`s1` doesn't have this option
|
||||
DROP SEQUENCE s1;
|
||||
|
@ -39,7 +39,6 @@ DROP SEQUENCE s1;
|
||||
unlock tables;
|
||||
DROP SEQUENCE s1;
|
||||
|
||||
|
||||
#
|
||||
# MDEV-15106 Unexpected ER_WRONG_INSERT_INTO_SEQUENCE upon INSERT with
|
||||
# multiple locks on sequences
|
||||
@ -51,3 +50,15 @@ LOCK TABLE seq1 WRITE, seq2 WRITE;
|
||||
INSERT INTO seq1 VALUES (1, 1, 100000, 1, 1, 100, 1, 1);
|
||||
DROP SEQUENCE seq1, seq2;
|
||||
|
||||
#
|
||||
# MDEV-15970
|
||||
# Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failure and/or
|
||||
# ER_KEY_NOT_FOUND upon TRUNCATE sequence under lock
|
||||
#
|
||||
|
||||
CREATE OR REPLACE SEQUENCE s1 ENGINE=MyISAM;
|
||||
LOCK TABLE s1 WRITE;
|
||||
--error ER_ILLEGAL_HA
|
||||
TRUNCATE TABLE s1;
|
||||
# Cleanup
|
||||
DROP SEQUENCE s1;
|
||||
|
Reference in New Issue
Block a user