mirror of
https://github.com/MariaDB/server.git
synced 2025-11-12 10:22:39 +03:00
MDEV-15742 Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type == 1' failed in handler::ha_write_row
41 lines
897 B
Plaintext
41 lines
897 B
Plaintext
--source include/have_sequence.inc
|
|
--source include/have_innodb.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists s1, t1, t2;
|
|
--enable_warnings
|
|
|
|
#
|
|
# MDEV-14831 CREATE OR REPLACE SEQUENCE under LOCK TABLE corrupts the
|
|
# sequence, causes ER_KEY_NOT_FOUND
|
|
#
|
|
CREATE SEQUENCE s1;
|
|
create table t1 (a int);
|
|
create table t2 (a int);
|
|
LOCK TABLE s1 WRITE, t1 write;
|
|
create or replace sequence s1;
|
|
select * from s1;
|
|
select * from t1;
|
|
--error ER_TABLE_NOT_LOCKED
|
|
select * from t2;
|
|
unlock tables;
|
|
select * from t1;
|
|
select * from t2;
|
|
drop tables s1, t1, t2;
|
|
|
|
#
|
|
# MDEV-15742 Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
|
# m_lock_type == 1' failed in handler::ha_write_row
|
|
#
|
|
|
|
CREATE SEQUENCE s1;
|
|
LOCK TABLE s1 READ;
|
|
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
|
SELECT NEXTVAL(s1);
|
|
--error ER_TABLE_NOT_LOCKED
|
|
SELECT NEXTVAL(s);
|
|
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
|
DROP SEQUENCE s1;
|
|
unlock tables;
|
|
DROP SEQUENCE s1;
|