mariadb/mysql-test/suite/innodb/t/temp_table.test
Marko Mäkelä 7cf97ed4ee MDEV-11816 Disallow CREATE TEMPORARY TABLE…ROW_FORMAT=COMPRESSED
MySQL 5.7 allows temporary tables to be created in ROW_FORMAT=COMPRESSED.
The usefulness of this is questionable. WL#7899 in MySQL 8.0.0
prevents the creation of such compressed tables, so that all InnoDB
temporary tables will be located inside the predefined
InnoDB temporary tablespace.

Pick up and adjust some tests from MySQL 5.7 and 8.0.

dict_tf_to_fsp_flags(): Remove the parameter is_temp.
fsp_flags_init(): Remove the parameter is_temporary.

row_mysql_drop_temp_tables(): Remove. There cannot be any temporary
tables in InnoDB. (This never removed #sql* tables in the datadir
which were created by DDL.)

dict_table_t::dir_path_of_temp_table: Remove.

create_table_info_t::m_temp_path: Remove.

create_table_info_t::create_options_are_invalid(): Do not allow
ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE for temporary tables.

create_table_info_t::innobase_table_flags(): Do not unnecessarily
prevent CREATE TEMPORARY TABLE with SPATIAL INDEX.
(MySQL 5.7 does allow this.)

fil_space_belongs_in_lru(): The only FIL_TYPE_TEMPORARY tablespace
is never subjected to closing least-recently-used files.
2017-01-18 08:42:57 +02:00

54 lines
1.8 KiB
Text

--source include/have_innodb.inc
####################################################################
# TC to test temp-table DML optimization changes for correctness #
# Sceanrio covered: #
# 1. bulk-insert with rollback + commit: this will ensure btree #
# node split with rollback and commit. #
####################################################################
#-------------------------------------------------------------------
#
# 1. bulk-insert with rollback + commit: this will ensure btree #
# node split with rollback and commit. #
#
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb;
create temporary table t2
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb;
--source suite/innodb/include/dml_ops.inc
drop temporary table t1,t2;
#
--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb key_block_size = 4;
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb;
set innodb_strict_mode=off;
--disable_warnings
create temporary table t2
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb key_block_size = 8;
set innodb_strict_mode=on;
--enable_warnings
--source suite/innodb/include/dml_ops.inc
drop temporary table t1, t2;
#
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb;
create temporary table t2
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb;
--source suite/innodb/include/dml_ops.inc