summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/default_row_format_create.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-03-07 12:07:49 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-03-07 17:49:42 +0200
commit8ef727b3d072c13788553f2174fd8bd70481f658 (patch)
treed00ce30faab9f1fdfbaf08c26b210f6ac07b2fed /mysql-test/suite/innodb/t/default_row_format_create.test
parent176d603cc7f2be0f5816a28c738cdd52ff6e3008 (diff)
downloadmariadb-git-8ef727b3d072c13788553f2174fd8bd70481f658.tar.gz
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.
Diffstat (limited to 'mysql-test/suite/innodb/t/default_row_format_create.test')
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_create.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/default_row_format_create.test b/mysql-test/suite/innodb/t/default_row_format_create.test
new file mode 100644
index 00000000000..e0981abf7eb
--- /dev/null
+++ b/mysql-test/suite/innodb/t/default_row_format_create.test
@@ -0,0 +1,28 @@
+--source include/have_innodb.inc
+--source include/innodb_row_format.inc
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;