mariadb/mysql-test/suite/innodb/t/file_format_defaults.test
2018-03-12 14:27:17 +02:00

76 lines
2 KiB
Text

#***********************************************************
# WL#7703:
# Check the max key length 3072 when innodb_large_prefix=ON
# Check boundary value of max key length 3073
# When innodb_file_format=Antelope, compress DDLs fails
# Check file_format_max becomes Barracuda on DDL operation
# on compression table.
#***********************************************************
-- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
call mtr.add_suppression("InnoDB: Cannot add field `c1` in table `test`\\.`tab0`");
# Check some default settings
SELECT @@innodb_strict_mode;
SELECT @@innodb_file_per_table;
SET @file_format = @@GLOBAL.innodb_file_format;
SET GLOBAL innodb_large_prefix=ON;
SET SQL_MODE=strict_all_tables;
CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
SHOW CREATE TABLE tab0;
DROP TABLE tab0;
--error ER_TOO_BIG_ROWSIZE
CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB KEY_BLOCK_SIZE=2;
SET GLOBAL innodb_file_format=Antelope;
--error ER_CANT_CREATE_TABLE
CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
SET GLOBAL innodb_file_format=Default;
CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
DROP TABLE tab0;
SELECT @@innodb_file_format;
SET GLOBAL innodb_strict_mode=OFF;
# Check with default value
SET GLOBAL innodb_strict_mode=Default;
SELECT @@innodb_strict_mode;
SET GLOBAL innodb_large_prefix=OFF;
SELECT @@innodb_large_prefix;
SET GLOBAL innodb_large_prefix=Default;
# Check with default value
SELECT @@innodb_large_prefix;
SET GLOBAL innodb_file_format_max=Default;
# Check with default value
SELECT @@innodb_file_format_max;
CREATE TABLE tab1(c1 int ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
# Check file format changed to Barracuda, on DDL operation
SELECT @@innodb_file_format_max;
SET GLOBAL innodb_file_format_max=Default;
# Restore to the value that we explicitly used at startup.
SET GLOBAL innodb_large_prefix=off;
SET GLOBAL innodb_file_format = @file_format;
DROP TABLE tab1;