Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-14904 Backport innodb_default_row_format
InnoDB in Debian uses utf8mb4 as default character set since version 10.0.20-2. This leads to major pain due to keys longer than 767 bytes. MariaDB 10.2 (and MySQL 5.7) introduced the setting innodb_default_row_format that is DYNAMIC by default. These versions also changed the default values of the parameters innodb_large_prefix=ON and innodb_file_format=Barracuda. This would allow longer column index prefixes to be created. The original purpose of these parameters was to allow InnoDB to be downgraded to MySQL 5.1, which is long out of support. Every InnoDB version since MySQL 5.5 does support operation with the relaxed limits. We backport the parameter innodb_default_row_format to MariaDB 10.1, but we will keep its default value at COMPACT. This allows MariaDB 10.1 to be configured so that CREATE TABLE is less likely to encounter a problem with the limitation: loose_innodb_large_prefix=ON loose_innodb_default_row_format=DYNAMIC (Note that the setting innodb_large_prefix was deprecated in MariaDB 10.2 and removed in MariaDB 10.3.) The only observable difference in the behaviour with the default settings should be that ROW_FORMAT=DYNAMIC tables can be created both in the system tablespace and in .ibd files, no matter what innodb_file_format has been assigned to. Unlike MariaDB 10.2, we are not changing the default value of innodb_file_format, so ROW_FORMAT=COMPRESSED tables cannot be created without changing the parameter.
- Loading branch information
Showing
26 changed files
with
946 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [redundant] | ||
| innodb_default_row_format=redundant | ||
|
|
||
| [compact] | ||
| innodb_default_row_format=compact | ||
|
|
||
| [dynamic] | ||
| innodb_default_row_format=dynamic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # The goal of including this file is to enable innodb_default_row_format | ||
| # combinations (see include/innodb_row_format.combinations) | ||
|
|
||
| --source include/have_innodb.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| SET @row_format = @@GLOBAL.innodb_default_row_format; | ||
| #################################### | ||
| # Check if table rebuilding alter isn't affect if table is created | ||
| # with explicit row_format | ||
| CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=INNODB; | ||
| INSERT INTO t1 VALUES (1, 'abc'); | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPACT | ||
| SET GLOBAL innodb_default_row_format=DYNAMIC; | ||
| ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY; | ||
| # Here we expect COMPACT because it was explicitly specified at CREATE | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPACT | ||
| DROP TABLE t1; | ||
| #################################### | ||
| # Check if table rebuilding alter is affected when there is no | ||
| # row_format specified at CREATE TABLE. | ||
| SET GLOBAL innodb_default_row_format = COMPACT; | ||
| CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB; | ||
| INSERT INTO t1 VALUES (1, 'abc'); | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| SET GLOBAL innodb_default_row_format = DYNAMIC; | ||
| ALTER TABLE t1 DROP PRIMARY KEY, ADD COLUMN c INT PRIMARY KEY; | ||
| # Here we expect DYNAMIC because there is no explicit ROW_FORMAT and the | ||
| # default_row_format is changed to DYNAMIC just before ALTER | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| DROP TABLE t1; | ||
| #################################### | ||
| # Check the row_format effect on ALTER, ALGORITHM=COPY | ||
| SET GLOBAL innodb_default_row_format = REDUNDANT; | ||
| CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=INNODB; | ||
| INSERT INTO t1 VALUES (1, REPEAT('abc',1000)); | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| SET GLOBAL innoDB_default_row_format = COMPACT; | ||
| ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY; | ||
| # Because of ALGORITHM=COPY, there is TABLE REBUILD and the table isn't | ||
| # created with explicit row_format, so we expect ROW_FORMAT=COMPACT | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| DROP TABLE t1; | ||
|
|
||
| ################################### | ||
| # Check the row_format effect on ALTER, ALGORITH=COPY on | ||
| # create table with explicit row_format | ||
| CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=INNODB; | ||
| INSERT INTO t1 VALUES (1, REPEAT('abc',1000)); | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=REDUNDANT | ||
| SET GLOBAL innoDB_default_row_format = COMPACT; | ||
| ALTER TABLE t1 ADD COLUMN c2 BLOB, ALGORITHM=COPY; | ||
| # Because of ALGORITHM=COPY, there is TABLE REBUILD and the table is | ||
| # created with explicit row_format, so we expect original | ||
| # ROW_FORMAT=REDUNDANT | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=REDUNDANT | ||
| DROP TABLE t1; | ||
|
|
||
| ################################## | ||
| # Check row_format on ALTER ALGORITHM=INPLACE | ||
| SET GLOBAL innodb_default_row_format=COMPACT; | ||
| CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT, KEY k1(b(10))) ENGINE=INNODB; | ||
| INSERT INTO t1 VALUES (1, REPEAT('abc',1000)); | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| SET GLOBAL innodb_default_row_format=DYNAMIC; | ||
| ALTER TABLE t1 DROP INDEX k1; | ||
| # Because it is in-place operation, there is no rebuild, so the | ||
| # original format has to be retained. | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| DROP TABLE t1; | ||
| SET GLOBAL innodb_default_row_format = @row_format; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| SET @row_format = @@GLOBAL.innodb_default_row_format; | ||
| SET @large_prefix = @@GLOBAL.innodb_large_prefix; | ||
| SET @file_format = @@GLOBAL.innodb_file_format; | ||
| SET GLOBAL innodb_file_format = barracuda; | ||
| # ########################################################### | ||
| # Check with Import/Export tablespace with Default_row_format | ||
| SET GLOBAL innodb_default_row_format=Compact; | ||
| SELECT @@innodb_default_row_format; | ||
| @@innodb_default_row_format | ||
| compact | ||
| SELECT @@innodb_file_per_table; | ||
| @@innodb_file_per_table | ||
| 1 | ||
| CREATE TABLE tab(a INT) ENGINE=InnoDB; | ||
| SHOW TABLE STATUS LIKE 'tab'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| tab InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| INSERT INTO tab VALUES(1); | ||
| INSERT INTO tab VALUES(2); | ||
| SELECT * FROM tab; | ||
| a | ||
| 1 | ||
| 2 | ||
| FLUSH TABLE tab FOR EXPORT; | ||
| UNLOCK TABLES; | ||
| DROP TABLE tab; | ||
| SET GLOBAL innodb_default_row_format=Dynamic; | ||
| CREATE TABLE tab(a INT) ENGINE=InnoDB; | ||
| ALTER TABLE tab DISCARD TABLESPACE; | ||
| ALTER TABLE tab IMPORT TABLESPACE; | ||
| ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1) | ||
| DROP TABLE tab; | ||
| SET GLOBAL innodb_default_row_format=Compact; | ||
| SELECT @@innodb_default_row_format; | ||
| @@innodb_default_row_format | ||
| compact | ||
| CREATE TABLE tab(a INT) ENGINE=InnoDB; | ||
| SHOW TABLE STATUS LIKE 'tab'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| tab InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| ALTER TABLE tab DISCARD TABLESPACE; | ||
| ALTER TABLE tab IMPORT TABLESPACE; | ||
| SELECT * FROM tab; | ||
| a | ||
| 1 | ||
| 2 | ||
| DROP TABLE tab; | ||
| # ########################################################### | ||
| SET GLOBAL innodb_default_row_format=Dynamic; | ||
| SET GLOBAL innodb_large_prefix=ON; | ||
| SELECT @@innodb_default_row_format; | ||
| @@innodb_default_row_format | ||
| dynamic | ||
| CREATE TABLE tab(a INT PRIMARY KEY, b VARCHAR(5000), KEY idx1(b(3070))) ENGINE= InnoDB; | ||
| SHOW TABLE STATUS LIKE 'tab'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| tab InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| INSERT INTO tab(a,b) VALUES(1,'Check with max column size'); | ||
| SELECT * FROM tab; | ||
| a b | ||
| 1 Check with max column size | ||
| SET GLOBAL innodb_default_row_format=COMPACT; | ||
| ALTER TABLE tab ROW_FORMAT=COMPACT; | ||
| ERROR HY000: Index column size too large. The maximum column size is 767 bytes. | ||
| DROP TABLE tab; | ||
| SET GLOBAL innodb_default_row_format=Default; | ||
| SELECT @@innodb_default_row_format; | ||
| @@innodb_default_row_format | ||
| compact | ||
| SET GLOBAL innodb_default_row_format=Dynamic; | ||
| SELECT @@innodb_default_row_format; | ||
| @@innodb_default_row_format | ||
| dynamic | ||
| CREATE TABLE tab(a INT PRIMARY KEY, b VARCHAR(5000), KEY idx1(b(767))) ENGINE= InnoDB; | ||
| SHOW TABLE STATUS LIKE 'tab'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| tab InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| INSERT INTO tab(a,b) VALUES(1,'Check with max column size'); | ||
| SELECT * FROM tab; | ||
| a b | ||
| 1 Check with max column size | ||
| ALTER TABLE tab ROW_FORMAT=COMPACT; | ||
| SHOW TABLE STATUS LIKE 'tab'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| tab InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPACT | ||
| SELECT * FROM tab; | ||
| a b | ||
| 1 Check with max column size | ||
| ALTER TABLE tab ROW_FORMAT=COMPRESSED; | ||
| SELECT * FROM tab; | ||
| a b | ||
| 1 Check with max column size | ||
| ALTER TABLE tab ROW_FORMAT=Dynamic; | ||
| SHOW TABLE STATUS LIKE 'tab'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| tab InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC | ||
| DROP TABLE tab; | ||
| SET GLOBAL innodb_default_row_format = @row_format; | ||
| SET GLOBAL innodb_large_prefix = @large_prefix; | ||
| SET GLOBAL innodb_file_format = @file_format; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- default_row_format_create.result | ||
| +++ default_row_format_create,dynamic.result | ||
| @@ -1,7 +1,7 @@ | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB; | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| -t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| +t1 InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; | ||
| SHOW TABLE STATUS LIKE 't1'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- default_row_format_create.result | ||
| +++ default_row_format_create,redundant.result | ||
| @@ -1,7 +1,7 @@ | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB; | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| -t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| +t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; | ||
| SHOW TABLE STATUS LIKE 't1'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB; | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT; | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPACT | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=REDUNDANT | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB | ||
| ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; | ||
| Warnings: | ||
| Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. | ||
| Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. | ||
| Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. | ||
| Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. | ||
| SHOW TABLE STATUS LIKE 't1'; | ||
| Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment | ||
| t1 InnoDB # Compact # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPRESSED key_block_size=1 | ||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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; |
Oops, something went wrong.