mariadb/mysql-test/suite/innodb/r/create_select.result
Marko Mäkelä 6d4841ae26 MDEV-35647 Possible hang during CREATE TABLE…SELECT error handling
ha_innobase::delete_table(): Clear trx->dict_operation_lock_mode
after, not before invoking trx->rollback(), so that
row_undo_mod_parse_undo_rec() will be invoked with dict_locked=true
and dict_sys_t::freeze() will not be invoked for loading a table
definition. Inside dict_sys_t::freeze(), an assertion !have_any()
would fail when the current thread is already holding the latch.

This fixes up commit c5fd9aa562 (MDEV-25919).

Reviewed by: Debarun Banerjee
2025-01-08 13:29:16 +02:00

42 lines
1.4 KiB
Text

connect con1, localhost, root,,;
connection default;
CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000;
connection con1;
KILL QUERY @id;
connection default;
ERROR 70100: Query execution was interrupted
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
DROP TABLE t1;
# End of 10.2 tests
#
# MDEV-35236 Assertion `(mem_root->flags & 4) == 0' failed in safe_lexcstrdup_root
#
prepare stmt from 'create or replace table t engine=innodb select 1 as f';
set innodb_compression_default=on;
execute stmt;
execute stmt;
drop table t;
# End of 10.5 tests
#
# MDEV-35647 Possible hang during CREATE TABLE…SELECT error handling
#
call mtr.add_suppression("InnoDB: DROP TABLE `test`\\.`t4`: Record changed");
SET @save_debug= @@GLOBAL.innodb_evict_tables_on_commit_debug;
SET GLOBAL innodb_evict_tables_on_commit_debug=on;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
SET GLOBAL innodb_evict_tables_on_commit_debug=@save_debug;
connection con1;
CREATE TABLE t2 (b BLOB) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1),('2025-01-21 00:00:00');
SET STATEMENT innodb_snapshot_isolation=ON FOR
CREATE TABLE t3 ENGINE=InnoDB AS SELECT * FROM t1;
connection default;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET STATEMENT innodb_snapshot_isolation=ON FOR
CREATE TABLE t4 (b BLOB CHECK (b)) ENGINE=InnoDB AS SELECT b FROM t2;
ERROR 22007: Truncated incorrect DOUBLE value: '2025-01-21 00:00:00'
connection con1;
disconnect con1;
connection default;
DROP TABLE t3,t2,t1;
# End of 10.6 tests