46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
#
|
|
# A series of tests to show the correct tablespace behavior
|
|
# for compressed tables.
|
|
#
|
|
--source include/have_innodb_max_16k.inc
|
|
--source include/have_partition.inc
|
|
|
|
SET default_storage_engine=InnoDB;
|
|
|
|
# Set up some variables
|
|
LET $MYSQLD_DATADIR = `select @@datadir`;
|
|
LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
|
|
LET $data_directory_clause = DATA DIRECTORY='$MYSQL_TMP_DIR/alt_dir';
|
|
|
|
# These values can change during the test
|
|
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
|
|
SET GLOBAL innodb_file_per_table=ON;
|
|
|
|
SET SESSION innodb_strict_mode = ON;
|
|
|
|
--echo #
|
|
--echo # CREATE TEMPORARY compressed TABLE with DATA DIRECTORY is rejected in strict mode.
|
|
--echo #
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
--error ER_ILLEGAL_HA
|
|
eval CREATE TEMPORARY TABLE t1 (a int KEY, b text) engine=InnoDB row_format=compressed $data_directory_clause;
|
|
SHOW WARNINGS;
|
|
|
|
SET SESSION innodb_strict_mode = OFF;
|
|
|
|
--echo # DATA DIRECTORY is ignored in CREATE TEMPORARY compressed TABLE in non-strict mode.
|
|
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
|
eval CREATE TEMPORARY TABLE t1 (a int KEY, b text) engine=InnoDB row_format=compressed $data_directory_clause;
|
|
SHOW CREATE TABLE t1;
|
|
DROP TABLE t1;
|
|
|
|
|
|
--echo #
|
|
--echo # Cleanup
|
|
--echo #
|
|
|
|
--disable_query_log
|
|
EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
|
|
--enable_query_log
|
|
|