1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
SELECT @@innodb_strict_mode;
@@innodb_strict_mode
0
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
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;
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
SHOW CREATE TABLE tab0;
Table Create Table
tab0 CREATE TABLE `tab0` (
`c1` varchar(65530) DEFAULT NULL,
KEY `c1` (`c1`(3072))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
DROP TABLE tab0;
CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB KEY_BLOCK_SIZE=2;
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
SET GLOBAL innodb_file_format=Antelope;
CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
DROP TABLE tab0;
SET GLOBAL innodb_file_format=Default;
SELECT @@innodb_file_format;
@@innodb_file_format
Antelope
SET GLOBAL innodb_strict_mode=OFF;
SET GLOBAL innodb_strict_mode=Default;
SELECT @@innodb_strict_mode;
@@innodb_strict_mode
0
SET GLOBAL innodb_large_prefix=OFF;
SELECT @@innodb_large_prefix;
@@innodb_large_prefix
0
SET GLOBAL innodb_large_prefix=Default;
SELECT @@innodb_large_prefix;
@@innodb_large_prefix
0
SET GLOBAL innodb_file_format_max=Default;
SELECT @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
CREATE TABLE tab1(c1 int ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
Warnings:
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
SET GLOBAL innodb_file_format_max=Default;
SET GLOBAL innodb_large_prefix=off;
SET GLOBAL innodb_file_format = @file_format;
DROP TABLE tab1;
|