mirror of
https://github.com/MariaDB/server.git
synced 2025-09-06 01:22:05 +02:00

Open temporary table properly. It doesn't appear in thd->open_tables, so no need to close it.
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
--source include/have_binlog_format_statement.inc
|
|
--source include/have_innodb.inc
|
|
|
|
--echo #
|
|
--echo # MDEV-36563 Assertion `!mysql_bin_log.is_open()' failed in
|
|
--echo # THD::mark_tmp_table_as_free_for_reuse upon REPAIR
|
|
--echo #
|
|
|
|
CREATE TEMPORARY TABLE t1 (c INT);
|
|
REPAIR TABLE t1;
|
|
DROP TABLE t1;
|
|
|
|
CREATE TEMPORARY TABLE t1 (c INT) engine=innodb;
|
|
REPAIR TABLE t1;
|
|
DROP TABLE t1;
|
|
|
|
set sql_mode='strict_all_tables';
|
|
SET @@session.binlog_format=statement;
|
|
CREATE TEMPORARY TABLE t1(a CHAR(3));
|
|
--error ER_DATA_TOO_LONG
|
|
insert into t1 values ("a"),("abcd"),("b");
|
|
select * from t1;
|
|
drop table t1;
|
|
set sql_mode=default;
|
|
|
|
CREATE TABLE t1 (c CHAR(3));
|
|
INSERT INTO t1 VALUES ("a"),("a");
|
|
|
|
CREATE TEMPORARY TABLE t2 (c CHAR(1) primary key);
|
|
INSERT INTO t2 (c) VALUES ('b');
|
|
--error ER_DUP_ENTRY
|
|
INSERT INTO t2 (c) VALUES ('b');
|
|
drop table t1,t2;
|
|
|
|
--echo # MDEV-37348 Logged CREATE TEMPORARY TABLE LIKE from unlogged table fails
|
|
set binlog_format='MIXED';
|
|
create temporary table t1 (x int);
|
|
set create_tmp_table_binlog_formats='MIXED';
|
|
create temporary table t2 like t1;
|
|
drop table t1, t2;
|