Commit 0c92794d authored by Marko Mäkelä's avatar Marko Mäkelä

Remove deprecated InnoDB file format parameters

The following options will be removed:

innodb_file_format
innodb_file_format_check
innodb_file_format_max
innodb_large_prefix

They have been deprecated in MySQL 5.7.7 (and MariaDB 10.2.2) in WL#7703.

The file_format column in two INFORMATION_SCHEMA tables will be removed:

innodb_sys_tablespaces
innodb_sys_tables

Code to update the file format tag at the end of page 0:5
(TRX_SYS_PAGE in the InnoDB system tablespace) will be removed.
When initializing a new database, the bytes will remain 0.

All references to the Barracuda file format will be removed.
Some references to the Antelope file format (meaning
ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT) will remain.

This basically ports WL#7704 from MySQL 8.0.0 to MariaDB 10.3.1:

commit 4a69dc2a95995501ed92d59a1de74414a38540c6
Author: Marko Mäkelä <marko.makela@oracle.com>
Date:   Wed Mar 11 22:19:49 2015 +0200
parent 3d615e4b
......@@ -1726,9 +1726,6 @@ innodb_init_param(void)
srv_adaptive_flushing = FALSE;
srv_use_sys_malloc = TRUE;
srv_file_format = 1; /* Barracuda */
srv_max_file_format_at_startup = UNIV_FORMAT_MIN; /* on */
/* --------------------------------------------------*/
srv_file_flush_method_str = innobase_unix_file_flush_method;
......
......@@ -191,8 +191,10 @@ drop table t1;
#
if(!$is_heap)
{
--error ER_TOO_LONG_KEY
--error 0,ER_TOO_LONG_KEY
eval create table t1 (a text character set utf8mb4, primary key(a(371))) engine $engine;
show warnings;
drop table if exists t1;
}
#
......
......@@ -28,7 +28,7 @@ BEGIN
-- Dump all global variables except those
-- that are supposed to change
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE variable_name NOT IN ('timestamp', 'innodb_file_format_max')
WHERE variable_name NOT IN ('timestamp')
AND variable_name not like "Last_IO_Err*"
AND variable_name != 'INNODB_IBUF_MAX_SIZE'
AND variable_name != 'INNODB_USE_NATIVE_AIO'
......
......@@ -244,7 +244,9 @@ hex(s1)
413F
drop table t1;
create table t1 (a text character set utf8mb4, primary key(a(371))) engine InnoDB;
ERROR 42000: Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
drop table if exists t1;
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE InnoDB;
INSERT INTO t1 VALUES ( 'test' );
SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a;
......@@ -1425,8 +1427,6 @@ CREATE TABLE t1 (
a varchar(255) NOT NULL default '',
KEY a (a)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
insert into t1 values (_utf8mb4 0xe880bd);
insert into t1 values (_utf8mb4 0x5b);
select hex(a) from t1;
......@@ -1473,8 +1473,6 @@ DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
INSERT INTO t1 VALUES('uu');
check table t1;
......@@ -2346,8 +2344,6 @@ Tape TINYTEXT,
PRIMARY KEY (clipid),
KEY tape(Tape(255))
) CHARACTER SET=utf8mb4 ENGINE InnoDB;
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid;
SHOW CREATE TABLE t1;
Table Create Table
......@@ -2356,7 +2352,7 @@ t1 CREATE TABLE `t1` (
`mos` tinyint(4) DEFAULT 0,
`Tape` tinytext DEFAULT NULL,
PRIMARY KEY (`clipid`),
KEY `tape` (`Tape`(191))
KEY `tape` (`Tape`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
DROP TABLE t1;
#
......
......@@ -244,7 +244,12 @@ hex(s1)
413F
drop table t1;
create table t1 (a text character set utf8mb4, primary key(a(371))) engine MyISAM;
ERROR 42000: Specified key was too long; max key length is 1000 bytes
show warnings;
Level Code Message
Error 1071 Specified key was too long; max key length is 1000 bytes
drop table if exists t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE MyISAM;
INSERT INTO t1 VALUES ( 'test' );
SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a;
......
......@@ -852,8 +852,6 @@ SUBPARTITION BY KEY(f6) SUBPARTITIONS 4 (
PARTITION p0 VALUES IN (1,3,9,null),
PARTITION p1 VALUES IN (2,4,0)
);
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
INSERT INTO t2 VALUES
('k','s',3,'b','j'),('a','b',NULL,'v','j'),('c','m',9,'t',NULL),
('b','l',9,'b',NULL),('i','y',3,'o','w'),('c','m',NULL,'a','m'),
......
--sync-relay-log-info=1 --relay-log-recovery=1 --loose-innodb_file_format_check=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
--sync-relay-log-info=1 --relay-log-recovery=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
--skip-core-file --skip-slave-start
......@@ -12,4 +12,3 @@
innodb_scrub : MDEV-8139 scrubbing does not work reliably
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
innodb_encryption-page-compression : MDEV-11420
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_file_format = `Barracuda`;
create table t1 (a varchar(255)) engine=innodb encrypted=yes;
create table t2 (a varchar(255)) engine=innodb;
show warnings;
......
......@@ -5,6 +5,8 @@ NAME
mysql/innodb_table_stats
mysql/innodb_index_stats
innodb_system
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create database enctests;
use enctests;
create table t1(a int not null primary key, b char(200)) engine=innodb;
......
......@@ -5,7 +5,6 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
# Restart mysqld --file-key-management-filename=keys2.txt
# Wait max 10 min for key encryption threads to encrypt all spaces
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
......
......@@ -4,12 +4,8 @@ call mtr.add_suppression("Plugin 'file_key_management' .*");
call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted.");
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted.");
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted.");
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted.");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-4] cannot be decrypted");
# Restart mysqld --file-key-management-filename=keys2.txt
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
......
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = on;
......
......@@ -40,7 +40,6 @@ NOT FOUND /author/ in t5.ibd
NOT FOUND /mangled/ in t6.ibd
# t7 ... on expecting NOT FOUND
NOT FOUND /mysql/ in t7.ibd
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
ALTER TABLE t1 ADD COLUMN b int default 2;
ALTER TABLE t2 ADD COLUMN b int default 2;
......
......@@ -14,10 +14,7 @@
--let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd
--let SEARCH_RANGE = 10000000
--disable_warnings
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_file_format = `Barracuda`;
--enable_warnings
create table t1 (a varchar(255)) engine=innodb encrypted=yes;
create table t2 (a varchar(255)) engine=innodb;
......
......@@ -6,18 +6,10 @@
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
--disable_query_log
--disable_warnings
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $encryption = `SELECT @@innodb_encrypt_tables`;
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
--enable_warnings
--enable_query_log
create database enctests;
use enctests;
......@@ -90,13 +82,3 @@ SET GLOBAL innodb_encrypt_tables=ON;
use test;
drop database enctests;
# reset system
--disable_query_log
--disable_warnings
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
set global innodb_compression_algorithm = DEFAULT;
--enable_warnings
--enable_query_log
......@@ -18,10 +18,7 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
--source include/wait_condition.inc
--disable_warnings
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
--enable_warnings
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
......
......@@ -9,19 +9,13 @@ call mtr.add_suppression("Plugin 'file_key_management' .*");
call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted.");
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted.");
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted.");
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted.");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-4] cannot be decrypted");
--echo # Restart mysqld --file-key-management-filename=keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
--disable_warnings
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
--enable_warnings
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
......
......@@ -5,6 +5,7 @@ let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`;
let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`;
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = on;
......
......@@ -75,10 +75,7 @@ set autocommit=1;
-- source include/start_mysqld.inc
--disable_warnings
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
--enable_warnings
ALTER TABLE t1 ADD COLUMN b int default 2;
ALTER TABLE t2 ADD COLUMN b int default 2;
......
......@@ -123,5 +123,3 @@ delete from t1;
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE setcrash;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
......@@ -123,5 +123,3 @@ delete from t1;
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE setcrash;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
SET GLOBAL innodb_large_prefix = OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
......@@ -968,5 +965,3 @@ COL196 TEXT,
COL197 TEXT)
row_format=compact,ENGINE=INNODB;
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
......@@ -54,6 +54,6 @@ connection default;
ALTER TABLE t MODIFY c2 INT NULL, ALGORITHM=INPLACE;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE NAME='test/t';
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
# test/t 33 6 # Barracuda Dynamic 0 Single
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
# test/t 33 6 # Dynamic 0 Single
DROP TABLE t;
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1;
insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc');
......
......@@ -2355,15 +2355,9 @@ a b
20 NULL
drop table t1;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (v varchar(65530), key(v));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
SET GLOBAL innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
Warning 1071 Specified key was too long; max key length is 3072 bytes
drop table t1;
create table t1 (v varchar(65536));
Warnings:
......@@ -2528,55 +2522,6 @@ t9 CREATE TABLE `t9` (
KEY `col1` (`col1`,`col2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (col1 varchar(768), index(col1))
character set = latin1 engine = innodb;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
create table t2 (col1 varbinary(768), index(col1))
character set = latin1 engine = innodb;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
create table t3 (col1 text, index(col1(768)))
character set = latin1 engine = innodb;
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
create table t4 (col1 blob, index(col1(768)))
character set = latin1 engine = innodb;
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
SET GLOBAL innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`col1` varchar(768) DEFAULT NULL,
KEY `col1` (`col1`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4;
set global innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (col1 varchar(768) primary key)
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
create table t2 (col1 varbinary(768) primary key)
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
create table t3 (col1 text, primary key(col1(768)))
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
create table t4 (col1 blob, primary key(col1(768)))
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
SET sql_mode = default;
set global innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t1
(
id INT PRIMARY KEY
......
set @old_innodb_file_format_max=@@innodb_file_format_max;
select @old_innodb_file_format_max;
@old_innodb_file_format_max
Barracuda
set global innodb_file_format_max = Barracuda;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format_max = DEFAULT;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
set global innodb_file_format_max = @old_innodb_file_format_max;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format_max = cheetah;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah'
set global innodb_file_format_max = Bear;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Bear'
set global innodb_file_format_max = on;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'ON'
set global innodb_file_format_max = off;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'off'
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
Barracuda
select @@innodb_file_format_check;
@@innodb_file_format_check
1
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format=antelope;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=cheetah;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'cheetah'
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=default;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=on;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
set global innodb_file_format=off;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format_max=antelope;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_max=barracuda;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_max=cheetah;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah'
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format_max=default;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
set global innodb_file_format=on;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
set global innodb_file_format=off;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
set global innodb_file_format_max=antelope;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_check=off;
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
......@@ -1165,8 +1165,6 @@ a b
drop table t1,t2;
create table t1(f1 varchar(800) binary not null, key(f1))
character set utf8 collate utf8_general_ci;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
insert into t1 values('aaa');
drop table t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
......@@ -1546,13 +1544,11 @@ create table t1(a text) engine=innodb default charset=utf8;
insert into t1 values('aaa');
set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for
alter table t1 add index(a(1024));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text DEFAULT NULL,
KEY `a` (`a`(255))
KEY `a` (`a`(1024))
) ENGINE=InnoDB DEFAULT CHARSET=utf8
drop table t1;
CREATE TABLE t1 (
......
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE worklog5743 (
col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
PRIMARY KEY (col_1_text(3072))
......@@ -87,6 +84,3 @@ worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
DROP TABLE worklog5743;
SET GLOBAL innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
......@@ -346,7 +346,7 @@ Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_buffer_page_lru but the InnoDB storage engine is not installed
select * from information_schema.innodb_buffer_stats;
select * from information_schema.innodb_sys_tables;
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_tables but the InnoDB storage engine is not installed
select * from information_schema.innodb_sys_tablestats;
......@@ -374,7 +374,7 @@ ID FOR_COL_NAME REF_COL_NAME POS
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_foreign_cols but the InnoDB storage engine is not installed
select * from information_schema.innodb_sys_tablespaces;
SPACE NAME FLAG FILE_FORMAT ROW_FORMAT PAGE_SIZE ZIP_PAGE_SIZE SPACE_TYPE FS_BLOCK_SIZE FILE_SIZE ALLOCATED_SIZE
SPACE NAME FLAG ROW_FORMAT PAGE_SIZE ZIP_PAGE_SIZE SPACE_TYPE FS_BLOCK_SIZE FILE_SIZE ALLOCATED_SIZE
Warnings:
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_tablespaces but the InnoDB storage engine is not installed
select * from information_schema.innodb_sys_datafiles;
......
......@@ -9,7 +9,6 @@
--source include/have_debug.inc
--source include/have_log_bin.inc
let $file_format_max=`SELECT @@innodb_file_format_max`;
CREATE TABLE t1(a CHAR(255),
b CHAR(255),
c CHAR(255),
......@@ -77,6 +76,3 @@ while ($numtests)
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE setcrash;
--disable_query_log
eval SET GLOBAL innodb_file_format_max=$file_format_max;
--enable_query_log
......@@ -9,7 +9,6 @@
--source include/have_debug.inc
--source include/have_log_bin.inc
let $file_format_max=`SELECT @@innodb_file_format_max`;
CREATE TABLE t1(a CHAR(255),
b CHAR(255),
c CHAR(255),
......@@ -77,6 +76,3 @@ while ($numtests)
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE setcrash;
--disable_query_log
eval SET GLOBAL innodb_file_format_max=$file_format_max;
--enable_query_log
......@@ -5,13 +5,7 @@
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
# These values can change during the test
let $innodb_large_prefix_orig = `SELECT @@innodb_large_prefix`;
--enable_query_log
SET GLOBAL innodb_large_prefix = OFF;
--echo # Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
......@@ -942,11 +936,3 @@ COL195 TEXT,
COL196 TEXT,
COL197 TEXT)
row_format=compact,ENGINE=INNODB;
#
# restore environment to the state it was before this test execution
#
--disable_query_log
EVAL SET GLOBAL innodb_large_prefix = $innodb_large_prefix_orig;
--enable_query_log
--source include/have_innodb.inc
--disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
--enable_query_log
--disable_warnings
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
--enable_warnings
create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1;
insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc');
......@@ -43,9 +37,6 @@ drop table t1;
# reset system
--disable_query_log
--disable_warnings
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_warnings
--enable_query_log
......@@ -1410,9 +1410,7 @@ source include/varchar.inc;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
SET GLOBAL innodb_large_prefix=OFF;
create table t1 (v varchar(65530), key(v));
SET GLOBAL innodb_large_prefix=default;
drop table t1;
create table t1 (v varchar(65536));
show create table t1;
......@@ -1580,39 +1578,6 @@ show create table t9;
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL innodb_large_prefix=OFF;
# these should have their index length trimmed
create table t1 (col1 varchar(768), index(col1))
character set = latin1 engine = innodb;
create table t2 (col1 varbinary(768), index(col1))
character set = latin1 engine = innodb;
create table t3 (col1 text, index(col1(768)))
character set = latin1 engine = innodb;
create table t4 (col1 blob, index(col1(768)))
character set = latin1 engine = innodb;
SET GLOBAL innodb_large_prefix=default;
show create table t1;
drop table t1, t2, t3, t4;
# these should be refused
set global innodb_large_prefix=OFF;
--error ER_TOO_LONG_KEY
create table t1 (col1 varchar(768) primary key)
character set = latin1 engine = innodb;
--error ER_TOO_LONG_KEY
create table t2 (col1 varbinary(768) primary key)
character set = latin1 engine = innodb;
--error ER_TOO_LONG_KEY
create table t3 (col1 text, primary key(col1(768)))
character set = latin1 engine = innodb;
--error ER_TOO_LONG_KEY
create table t4 (col1 blob, primary key(col1(768)))
character set = latin1 engine = innodb;
SET sql_mode = default;
set global innodb_large_prefix=default;
#
# Test improved foreign key error messages (bug #3443)
#
......
--source include/have_innodb.inc
# This is the unit test for bug #47167.
# It tests setting the global variable "innodb_file_format_max" (
# originally "innodb_file_format_check") with a user-Defined Variable.
--source include/not_embedded.inc
--source include/restart_and_reinit.inc
# Save the value (Antelope) in 'innodb_file_format_max' to
# 'old_innodb_file_format_max'
set @old_innodb_file_format_max=@@innodb_file_format_max;
# @old_innodb_file_format_max shall have the value of 'Antelope'
select @old_innodb_file_format_max;
# Reset the value in 'innodb_file_format_max' to 'Barracuda'
set global innodb_file_format_max = Barracuda;
select @@innodb_file_format_max;
# Set 'innodb_file_format_max' to its default value, which
# is the latest file format supported in the current release.
set global innodb_file_format_max = DEFAULT;
select @@innodb_file_format_max;
# Put the saved value back to 'innodb_file_format_max'
set global innodb_file_format_max = @old_innodb_file_format_max;
# Check whether 'innodb_file_format_max' get its original value.
select @@innodb_file_format_max;
# Following are negative tests, all should fail.
--disable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_max = cheetah;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_max = Bear;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_max = on;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_max = off;
--enable_warnings
# Put the saved value back to 'innodb_file_format_max'
--disable_query_log
set global innodb_file_format_max = @old_innodb_file_format_max;
--enable_query_log
-- source include/restart_and_reinit.inc
-- source include/have_innodb.inc
let $innodb_file_format_orig=`select @@innodb_file_format`;
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
select @@innodb_file_format;
select @@innodb_file_format_check;
select @@innodb_file_format_max;
set global innodb_file_format=antelope;
set global innodb_file_format=barracuda;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=cheetah;
select @@innodb_file_format;
set global innodb_file_format=default;
select @@innodb_file_format;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=on;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=off;
select @@innodb_file_format;
set global innodb_file_format_max=antelope;
set global innodb_file_format_max=barracuda;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format_max=cheetah;
select @@innodb_file_format_max;
set global innodb_file_format_max=default;
select @@innodb_file_format_max;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=on;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=off;
select @@innodb_file_format_max;
set global innodb_file_format_max=antelope;
# innodb_file_format_check is read only variable, can be
# set as server startup parameter
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set global innodb_file_format_check=off;
--disable_query_log
eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
--enable_query_log
--loose-innodb-lock-wait-timeout=2
--default-storage-engine=MyISAM
--loose-innodb-large-prefix=off
......@@ -15,10 +15,6 @@
# Test restart the server and "shutdown_server" looks for pid file
# which is not there with embedded mode
--source include/not_embedded.inc
# Save innodb variables
let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
set global innodb_large_prefix=1;
#------------------------------------------------------------------------------
# Stop the server in between when prefix index are created and see if state is
......@@ -97,8 +93,3 @@ SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
DROP TABLE worklog5743;
#------------------------------------------------------------------------------
eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig;
......@@ -31,7 +31,6 @@ call mtr.add_suppression("Parent table of FTS auxiliary table "
# create test-bed
#
let $per_table = `select @@innodb_file_per_table`;
let $format = `select @@innodb_file_format`;
eval set global innodb_file_per_table = on;
let $WL6501_TMP_DIR = `select @@tmpdir`;
......
......@@ -7,7 +7,6 @@
# create test-bed
#
let $per_table = `select @@innodb_file_per_table`;
let $format = `select @@innodb_file_format`;
let $WL6501_TMP_DIR = `select @@tmpdir`;
let $WL6501_DATA_DIR = `select @@datadir`;
......@@ -108,5 +107,4 @@ drop procedure populate_small;
#
# remove test-bed
#
eval set global innodb_file_format = $format;
eval set global innodb_file_per_table = $per_table;
......@@ -282,26 +282,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_file_format = `Antelope`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
Got one of the listed errors
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
Got one of the listed errors
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 7) This series of tests were moved from innodb-index to here
# because the second alter table t1 assumes a 16k page size.
# Moving the test allows the rest of innodb-index to be run on all
......
......@@ -245,28 +245,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_file_format = `Antelope`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 7) Not included here; 16k only
# Test 8) Test creating a table that could lead to undo log overflow.
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
......
......@@ -257,27 +257,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_file_format = `Antelope`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 7) Not included here; 16k only
# Test 8) Test creating a table that could lead to undo log overflow.
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
......
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_format=`Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=ON;
SET SESSION innodb_strict_mode = ON;
# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
......@@ -260,76 +257,10 @@ Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 1
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
# and that they can be set to default values during strict mode.
SET GLOBAL innodb_file_format=Antelope;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
Got one of the listed errors
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
Got one of the listed errors
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Redundant row_format=REDUNDANT
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=COMPACT
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
SHOW WARNINGS;
Level Code Message
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SET GLOBAL innodb_file_format=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
DROP TABLE t1;
# and a valid non-zero KEY_BLOCK_SIZE
# can be set to default values during strict mode.
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET GLOBAL innodb_file_format=Antelope;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f1 INT;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
......@@ -344,9 +275,6 @@ Level Code Message
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
SET GLOBAL innodb_file_format=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED
# and a valid non-zero KEY_BLOCK_SIZE are rejected with
# innodb_file_per_table=OFF and that they can be set to default
......@@ -744,9 +672,7 @@ Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic key_block_size=15
# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
# Test 15) StrictMode=OFF.
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
......@@ -754,27 +680,12 @@ Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compressed row_format=COMPRESSED key_block_size=1
SET GLOBAL innodb_file_format=Antelope;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f1 INT;
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=DYNAMIC.
SHOW WARNINGS;
Level Code Message
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=DYNAMIC.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=COMPRESSED key_block_size=1
SET GLOBAL innodb_file_format=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
t1 Compressed row_format=COMPRESSED key_block_size=1
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
......@@ -788,18 +699,12 @@ Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_format=Antelope;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_format=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
......@@ -853,5 +758,3 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
# Cleanup
DROP TABLE t1;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
......@@ -94,18 +94,6 @@ create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_1(a2(4000));
Got one of the listed errors
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_1(a2(4000));
Got one of the listed errors
show warnings;
......@@ -128,19 +116,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET sql_mode= '';
create index idx1 on worklog5743_2(a2(4000));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_2(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
......@@ -163,18 +138,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
create index idx6 on worklog5743_2(a1, a2(940));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_4(a2(4000));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_4(a2(4000));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
show warnings;
......@@ -197,18 +160,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
create index idx6 on worklog5743_4(a1, a2(1964));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_8(a2(1000));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_8(a2(3073));
Warnings:
Note 1071 Specified key was too long; max key length is 3072 bytes
......@@ -237,18 +188,6 @@ Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_16(a2(1000));
Warnings:
Note 1071 Specified key was too long; max key length is 767 bytes
show warnings;
Level Code Message
Note 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_16(a2(3073));
Warnings:
Note 1071 Specified key was too long; max key length is 3072 bytes
......@@ -283,37 +222,21 @@ insert into worklog5743_2 values(9, repeat("a", 10000));
insert into worklog5743_4 values(9, repeat("a", 10000));
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
insert into worklog5743_1 values(2, repeat("b", 10000));
insert into worklog5743_2 values(2, repeat("b", 10000));
insert into worklog5743_4 values(2, repeat("b", 10000));
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select a1, left(a2, 20) from worklog5743_1;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_2;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_4;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_8;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_16;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
begin;
update worklog5743_1 set a1 = 1000;
update worklog5743_2 set a1 = 1000;
......@@ -323,23 +246,18 @@ update worklog5743_16 set a1 = 1000;
select a1, left(a2, 20) from worklog5743_1;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_2;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_4;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_8;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
select a1, left(a2, 20) from worklog5743_16;
a1 left(a2, 20)
1000 aaaaaaaaaaaaaaaaaaaa
1000 bbbbbbbbbbbbbbbbbbbb
connection con1;
select @@session.tx_isolation;
@@session.tx_isolation
......
......@@ -7,9 +7,6 @@ table_name row_format data_length index_length
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
set session innodb_strict_mode=0;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @@global.innodb_stats_on_metadata=ON;
create table t0(a int primary key) engine=innodb row_format=compressed;
Warnings:
......@@ -19,7 +16,6 @@ create table t00(a int primary key) engine=innodb
key_block_size=4 row_format=compressed;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
......@@ -29,23 +25,17 @@ create table t3(a int primary key) engine=innodb row_format=compact;
create table t4(a int primary key) engine=innodb key_block_size=9;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
create table t5(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_per_table=on;
create table t6(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_format=`1`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
create table t7(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
......@@ -159,40 +149,7 @@ count(*)
1
update t1 set c3 = repeat('E', 20000) where c1 = 1;
drop table t1;
set global innodb_file_format=`0`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format=`1`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=`2`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '2'
set global innodb_file_format=`-1`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '-1'
set global innodb_file_format=`Antelope`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=`Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=`Cheetah`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Cheetah'
set global innodb_file_format=`abc`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'abc'
set global innodb_file_format=`1a`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '1a'
set global innodb_file_format=``;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of ''
set global innodb_file_per_table = on;
set global innodb_file_format = `1`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set innodb_strict_mode = off;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
drop table t1;
......@@ -325,84 +282,4 @@ mysqltest_innodb_zip t7 Dynamic {valid} 0
mysqltest_innodb_zip t8 Compact {valid} 0
mysqltest_innodb_zip t9 Redundant {valid} 0
drop table t7, t8, t9;
set global innodb_file_per_table = on;
set global innodb_file_format = `0`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (id int primary key) engine = innodb key_block_size = 1;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
create table t2 (id int primary key) engine = innodb key_block_size = 2;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
create table t3 (id int primary key) engine = innodb key_block_size = 4;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
create table t6 (id int primary key) engine = innodb row_format = compressed;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
create table t7 (id int primary key) engine = innodb row_format = dynamic;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
mysqltest_innodb_zip t8 Compact {valid} 0
mysqltest_innodb_zip t9 Redundant {valid} 0
drop table t8, t9;
set global innodb_file_per_table=1;
set global innodb_file_format=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table=on;
set global innodb_file_format=`Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_max=`Antelope`;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table normal_table (
c1 int
) engine = innodb;
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
create table zip_table (
c1 int
) engine = innodb key_block_size = 4;
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format_max=`Antelope`;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
show table status;
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
drop table normal_table, zip_table;
DROP DATABASE mysqltest_innodb_zip;
set global innodb_file_per_table=on;
set global innodb_file_format=`1`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1(a text) engine=innodb key_block_size=8;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
......@@ -14,5 +11,3 @@ create table t2(a text) engine=innodb;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
drop table t2;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
......@@ -109,9 +109,6 @@ drop table t2;
drop table t3;
drop procedure populate;
drop procedure populate_small;
set global innodb_file_format = Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
set innodb_strict_mode=OFF;
create procedure populate()
......@@ -222,9 +219,6 @@ drop table t2;
drop table t3;
drop procedure populate;
drop procedure populate_small;
set global innodb_file_format = Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
set innodb_strict_mode=OFF;
create procedure populate()
......@@ -339,7 +333,4 @@ drop table t2;
drop table t3;
drop procedure populate;
drop procedure populate_small;
set global innodb_file_format = Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
......@@ -298,15 +298,6 @@ SHOW WARNINGS;
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_file_format = `Antelope`;
--error ER_ILLEGAL_HA,1005
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
SHOW WARNINGS;
--error ER_ILLEGAL_HA,1005
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
SET GLOBAL innodb_file_format = `Barracuda`;
--echo # Test 7) This series of tests were moved from innodb-index to here
--echo # because the second alter table t1 assumes a 16k page size.
......
......@@ -247,15 +247,6 @@ SHOW WARNINGS;
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_file_format = `Antelope`;
--error ER_CANT_CREATE_TABLE
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
SHOW WARNINGS;
--error ER_CANT_CREATE_TABLE
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
SET GLOBAL innodb_file_format = `Barracuda`;
--echo # Test 7) Not included here; 16k only
......
......@@ -264,15 +264,6 @@ SHOW WARNINGS;
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_file_format = `Antelope`;
--error ER_CANT_CREATE_TABLE
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
SHOW WARNINGS;
--error ER_CANT_CREATE_TABLE
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
SHOW WARNINGS;
SET GLOBAL innodb_file_format = `Barracuda`;
--echo # Test 7) Not included here; 16k only
......
......@@ -36,8 +36,7 @@
# 4) KEY_BLOCK_SIZE=1,2,4,8 & 16 are incompatible with COMPACT, DYNAMIC &
# REDUNDANT.
# 5) KEY_BLOCK_SIZE=1,2,4,8 & 16 as well as ROW_FORMAT=COMPRESSED
# are incompatible with innodb_file_format=Antelope
# and innodb_file_per_table=OFF
# are incompatible with innodb_file_per_table=OFF
# 6) KEY_BLOCK_SIZE on an ALTER must occur with ROW_FORMAT=COMPRESSED
# or ROW_FORMAT=DEFAULT if the ROW_FORMAT was previously specified
# as COMPACT, DYNAMIC or REDUNDANT.
......@@ -49,7 +48,7 @@
# 2. Ignore a bad ROW_FORMAT, defaulting to COMPACT.
# 3. Ignore a valid KEY_BLOCK_SIZE when an incompatible but valid
# ROW_FORMAT is specified.
# 4. If innodb_file_format=Antelope or innodb_file_per_table=OFF
# 4. If innodb_file_per_table=OFF
# it will ignore ROW_FORMAT=COMPRESSED and non-zero KEY_BLOCK_SIZEs.
#
# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors"
......@@ -61,13 +60,9 @@
-- source include/have_innodb_zip.inc
SET default_storage_engine=InnoDB;
--disable_query_log
# These values can change during the test
LET $innodb_file_format_orig=`select @@innodb_file_format`;
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
--enable_query_log
SET GLOBAL innodb_file_format=`Barracuda`;
SET GLOBAL innodb_file_per_table=ON;
# The first half of these tests are with strict mode ON.
......@@ -216,40 +211,9 @@ CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
SHOW WARNINGS;
--echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
--echo # and that they can be set to default values during strict mode.
SET GLOBAL innodb_file_format=Antelope;
--error ER_ILLEGAL_HA,1005
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
SHOW WARNINGS;
--error ER_ILLEGAL_HA,1005
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
--error 1005
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
SHOW WARNINGS;
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
SHOW WARNINGS;
SET GLOBAL innodb_file_format=Barracuda;
DROP TABLE t1;
--echo # and a valid non-zero KEY_BLOCK_SIZE
--echo # can be set to default values during strict mode.
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET GLOBAL innodb_file_format=Antelope;
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW CREATE TABLE t1;
SHOW WARNINGS;
......@@ -257,7 +221,6 @@ ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
SET GLOBAL innodb_file_format=Barracuda;
--echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED
--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with
......@@ -466,18 +429,14 @@ CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
--echo # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
--echo valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
--echo is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
--echo # Test 15) StrictMode=OFF.
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
SET GLOBAL innodb_file_format=Antelope;
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
SET GLOBAL innodb_file_format=Barracuda;
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
......@@ -485,11 +444,9 @@ DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
SET GLOBAL innodb_file_format=Antelope;
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
SET GLOBAL innodb_file_format=Barracuda;
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
......@@ -527,6 +484,5 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
DROP TABLE t1;
--disable_query_log
EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig;
EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
--enable_query_log
......@@ -137,11 +137,6 @@ create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
# See page_zip_empty_size() and Bug #47495 for more detail.
# Test edge cases for indexes using key_block_size=1
set global innodb_large_prefix=0;
-- error ER_TOO_LONG_KEY,1118
create index idx1 on worklog5743_1(a2(4000));
show warnings;
set global innodb_large_prefix=1;
-- error ER_TOO_LONG_KEY,1118
create index idx2 on worklog5743_1(a2(4000));
show warnings;
......@@ -159,12 +154,6 @@ create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
# Test edge cases for indexes using key_block_size=2
set global innodb_large_prefix=0;
# Check index creation behavior without STRICT mode
SET sql_mode= '';
create index idx1 on worklog5743_2(a2(4000));
show warnings;
set global innodb_large_prefix=1;
-- error ER_TOO_BIG_ROWSIZE
create index idx2 on worklog5743_2(a2(4000));
show warnings;
......@@ -182,10 +171,6 @@ create index idx6 on worklog5743_2(a1, a2(940));
show warnings;
# Test edge cases for indexes using key_block_size=4
set global innodb_large_prefix=0;
create index idx1 on worklog5743_4(a2(4000));
show warnings;
set global innodb_large_prefix=1;
-- error ER_TOO_BIG_ROWSIZE
create index idx2 on worklog5743_4(a2(4000));
show warnings;
......@@ -203,10 +188,6 @@ create index idx6 on worklog5743_4(a1, a2(1964));
show warnings;
# Test edge cases for indexes using key_block_size=8
set global innodb_large_prefix=0;
create index idx1 on worklog5743_8(a2(1000));
show warnings;
set global innodb_large_prefix=1;
create index idx2 on worklog5743_8(a2(3073));
show warnings;
create index idx3 on worklog5743_8(a2(3072));
......@@ -223,10 +204,6 @@ create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
show warnings;
# Test edge cases for indexes using key_block_size=16
set global innodb_large_prefix=0;
create index idx1 on worklog5743_16(a2(1000));
show warnings;
set global innodb_large_prefix=1;
create index idx2 on worklog5743_16(a2(3073));
show warnings;
create index idx3 on worklog5743_16(a2(3072));
......@@ -250,16 +227,6 @@ insert into worklog5743_4 values(9, repeat("a", 10000));
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
# Now if we change the global innodb_large_prefix back to 767,
# updates to these indexes should still be allowed.
set global innodb_large_prefix=0;
insert into worklog5743_1 values(2, repeat("b", 10000));
insert into worklog5743_2 values(2, repeat("b", 10000));
insert into worklog5743_4 values(2, repeat("b", 10000));
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
set global innodb_large_prefix=1;
select a1, left(a2, 20) from worklog5743_1;
select a1, left(a2, 20) from worklog5743_2;
select a1, left(a2, 20) from worklog5743_4;
......
......@@ -136,8 +136,7 @@ create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
# See page_zip_empty_size() and Bug #47495 for more detail.
# Test edge cases for indexes using key_block_size=1
set global innodb_large_prefix=0;
-- error ER_TOO_LONG_KEY
-- error ER_TOO_BIG_ROWSIZE
create index idx1 on worklog5743_1(a2(4000));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
......@@ -154,7 +153,6 @@ create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
# Test edge cases for indexes using key_block_size=2
set global innodb_large_prefix=1;
SET sql_mode= '';
create index idx1 on worklog5743_2(a2(4000));
show warnings;
......@@ -169,7 +167,6 @@ show warnings;
create index idx6 on worklog5743_2(a1, a2(764));
show warnings;
# Test edge cases for indexes using key_block_size=4
set global innodb_large_prefix=0;
create index idx1 on worklog5743_4(a2(4000));
show warnings;
show create table worklog5743_4;
......@@ -188,14 +185,6 @@ insert into worklog5743_1 values(9, repeat("a", 10000));
insert into worklog5743_2 values(9, repeat("a", 10000));
insert into worklog5743_4 values(9, repeat("a", 10000));
# Now if we change the global innodb_large_prefix back to 767,
# updates to these indexes should still be allowed.
set global innodb_large_prefix=0;
insert into worklog5743_1 values(2, repeat("b", 10000));
insert into worklog5743_2 values(2, repeat("b", 10000));
insert into worklog5743_4 values(2, repeat("b", 10000));
set global innodb_large_prefix=1;
select a1, left(a2, 20) from worklog5743_1;
select a1, left(a2, 20) from worklog5743_2;
select a1, left(a2, 20) from worklog5743_4;
......
......@@ -138,12 +138,7 @@ create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
# See page_zip_empty_size() and Bug #47495 for more detail.
# Test edge cases for indexes using key_block_size=1
set global innodb_large_prefix=0;
-- error ER_TOO_LONG_KEY
create index idx1 on worklog5743_1(a2(4000));
show warnings;
set global innodb_large_prefix=1;
-- error ER_TOO_LONG_KEY
-- error ER_TOO_BIG_ROWSIZE
create index idx2 on worklog5743_1(a2(4000));
show warnings;
-- error ER_TOO_BIG_ROWSIZE
......@@ -160,11 +155,6 @@ create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
# Test edge cases for indexes using key_block_size=2
set global innodb_large_prefix=0;
SET sql_mode= '';
create index idx1 on worklog5743_2(a2(4000));
show warnings;
set global innodb_large_prefix=1;
-- error ER_TOO_BIG_ROWSIZE
create index idx2 on worklog5743_2(a2(4000));
show warnings;
......@@ -182,10 +172,6 @@ create index idx6 on worklog5743_2(a1, a2(940));
show warnings;
# Test edge cases for indexes using key_block_size=4
set global innodb_large_prefix=0;
create index idx1 on worklog5743_4(a2(4000));
show warnings;
set global innodb_large_prefix=1;
create index idx3 on worklog5743_4(a2(1537));
show warnings;
create index idx4 on worklog5743_4(a2(1536));
......@@ -197,10 +183,6 @@ create index idx6 on worklog5743_4(a1, a2(1532));
show warnings;
# Test edge cases for indexes using key_block_size=8
set global innodb_large_prefix=0;
create index idx1 on worklog5743_8(a2(1000));
show warnings;
set global innodb_large_prefix=1;
create index idx2 on worklog5743_8(a2(3073));
show warnings;
create index idx3 on worklog5743_8(a2(3072));
......@@ -218,15 +200,6 @@ insert into worklog5743_2 values(9, repeat("a", 10000));
insert into worklog5743_4 values(9, repeat("a", 10000));
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
# Now if we change the global innodb_large_prefix back to 767,
# updates to these indexes should still be allowed.
set global innodb_large_prefix=0;
insert into worklog5743_1 values(2, repeat("b", 10000));
insert into worklog5743_2 values(2, repeat("b", 10000));
insert into worklog5743_4 values(2, repeat("b", 10000));
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
set global innodb_large_prefix=1;
select a1, left(a2, 20) from worklog5743_1;
select a1, left(a2, 20) from worklog5743_2;
select a1, left(a2, 20) from worklog5743_4;
......
......@@ -7,17 +7,12 @@ SELECT table_name, row_format, data_length, index_length
WHERE table_schema='mysqltest_innodb_zip';
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
let $innodb_file_format_orig=`select @@innodb_file_format`;
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
--let $query_i_s = SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql'
set session innodb_strict_mode=0;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
SET @@global.innodb_stats_on_metadata=ON;
create table t0(a int primary key) engine=innodb row_format=compressed;
......@@ -33,7 +28,6 @@ key_block_size=1 row_format=redundant;
set global innodb_file_per_table=on;
create table t6(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
set global innodb_file_format=`1`;
create table t7(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
create table t8(a int primary key) engine=innodb
......@@ -129,34 +123,7 @@ select count(*) from t1 where c4 = repeat('C', 20000);
update t1 set c3 = repeat('E', 20000) where c1 = 1;
drop table t1;
#
#
# Test innodb_file_format
#
set global innodb_file_format=`0`;
select @@innodb_file_format;
set global innodb_file_format=`1`;
select @@innodb_file_format;
-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`2`;
-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`-1`;
set global innodb_file_format=`Antelope`;
set global innodb_file_format=`Barracuda`;
-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`Cheetah`;
-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`abc`;
-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=`1a`;
-- error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format=``;
#test strict mode.
# this does not work anymore, has been removed from mysqltest
# -- enable_errors
set global innodb_file_per_table = on;
set global innodb_file_format = `1`;
set innodb_strict_mode = off;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
......@@ -283,80 +250,12 @@ create table t9 (id int primary key) engine = innodb row_format = redundant;
--eval $query_i_s
drop table t7, t8, t9;
#test valid values with innodb_file_format unset
set global innodb_file_per_table = on;
set global innodb_file_format = `0`;
--replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE
create table t1 (id int primary key) engine = innodb key_block_size = 1;
--replace_regex / - .*[0-9]*[)]/)/
show warnings;
--replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb key_block_size = 2;
--replace_regex / - .*[0-9]*[)]/)/
show warnings;
--replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE
create table t3 (id int primary key) engine = innodb key_block_size = 4;
show warnings;
# Tests for key_block_size = 8 and 16 were moved to innodb_16k, innodb_8k
# and innodb_4k since they get different warnings with smaller page sizes.
--error ER_CANT_CREATE_TABLE
create table t6 (id int primary key) engine = innodb row_format = compressed;
--replace_regex / - .*[0-9]*[)]/)/
show warnings;
--replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE
create table t7 (id int primary key) engine = innodb row_format = dynamic;
--replace_regex / - .*[0-9]*[)]/)/
show warnings;
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
--replace_result 16384 {valid} 8192 {valid} 4096 {valid}
--eval $query_i_s
drop table t8, t9;
eval set global innodb_file_per_table=$per_table;
eval set global innodb_file_format=$format;
#
# Testing of tablespace tagging
#
-- disable_info
set global innodb_file_per_table=on;
set global innodb_file_format=`Barracuda`;
set global innodb_file_format_max=`Antelope`;
create table normal_table (
c1 int
) engine = innodb;
select @@innodb_file_format_max;
create table zip_table (
c1 int
) engine = innodb key_block_size = 4;
select @@innodb_file_format_max;
set global innodb_file_format_max=`Antelope`;
select @@innodb_file_format_max;
-- disable_result_log
show table status;
-- enable_result_log
select @@innodb_file_format_max;
drop table normal_table, zip_table;
-- disable_result_log
#
# restore environment to the state it was before this test execution
#
-- disable_query_log
eval set global innodb_file_format=$format;
eval set global innodb_file_per_table=$per_table;
eval set session innodb_strict_mode=$innodb_strict_mode_orig;
eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata;
--enable_query_log
......
--innodb_large_prefix=ON
\ No newline at end of file
......@@ -5,13 +5,11 @@
-- source include/not_encrypted.inc
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0
set global innodb_file_per_table=on;
set global innodb_file_format=`1`;
create table t1(a text) engine=innodb key_block_size=8;
-- disable_query_log
......@@ -59,5 +57,4 @@ drop table t2;
#
-- disable_query_log
eval set global innodb_file_format=$format;
eval set global innodb_file_per_table=$per_table;
--innodb --changed_page_bitmaps --innodb-file-format=Barracuda
\ No newline at end of file
--innodb --changed_page_bitmaps
......@@ -6,4 +6,3 @@
--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/logkey.txt
--innodb_strict_mode
--innodb_file_per_table
--innodb_file_format=Barracuda
--loose-innodb-file-format-check --loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M
--loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M
--sync-relay-log-info=1 --relay-log-recovery=1 --loose-innodb_file_format_check=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
--sync-relay-log-info=1 --relay-log-recovery=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
--skip-core-file
SET @start_global_value = @@global.innodb_file_format;
SELECT @start_global_value;
@start_global_value
Barracuda
Valid values are 'Antelope' and 'Barracuda'
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
@@global.innodb_file_format in ('Antelope', 'Barracuda')
1
select @@global.innodb_file_format;
@@global.innodb_file_format
Barracuda
select @@session.innodb_file_format;
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable
show global variables like 'innodb_file_format';
Variable_name Value
innodb_file_format Barracuda
show session variables like 'innodb_file_format';
Variable_name Value
innodb_file_format Barracuda
select * from information_schema.global_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Barracuda
select * from information_schema.session_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Barracuda
set global innodb_file_format='Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_file_format;
@@global.innodb_file_format
Antelope
select * from information_schema.global_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
select * from information_schema.session_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
set @@global.innodb_file_format='Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_file_format;
@@global.innodb_file_format
Barracuda
select * from information_schema.global_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Barracuda
select * from information_schema.session_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Barracuda
set session innodb_file_format='Salmon';
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_file_format='Salmon';
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_file_format=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_file_format'
set global innodb_file_format=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_file_format'
set global innodb_file_format='Salmon';
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Salmon'
SET @@global.innodb_file_format = @start_global_value;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_file_format;
@@global.innodb_file_format
Barracuda
SET @start_global_value = @@global.innodb_file_format_check;
SELECT @start_global_value;
@start_global_value
1
Valid values are 'ON' and 'OFF'
SELECT @@global.innodb_file_format_check in (0, 1);
@@global.innodb_file_format_check in (0, 1)
1
SELECT @@global.innodb_file_format_check;
@@global.innodb_file_format_check
1
SELECT @@session.innodb_file_format_check;
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
SHOW global variables LIKE 'innodb_file_format_check';
Variable_name Value
innodb_file_format_check ON
SHOW session variables LIKE 'innodb_file_format_check';
Variable_name Value
innodb_file_format_check ON
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_CHECK ON
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_CHECK ON
SET @@global.innodb_file_format_check='Off';
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
Expected error 'Read only variable'
SET @@global.innodb_file_format_check=1;
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
Expected error 'Read only variable'
SET @@global.innodb_file_format_check=0;
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
Expected error 'Read only variable'
SET @@global.innodb_file_format_check='On';
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
Expected error 'Read only variable'
SET session innodb_large_prefix='OFF';
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
SET @@session.innodb_stats_on_metadata='ON';
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable and should be set with SET GLOBAL
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_format_check';
IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
COUNT(@@GLOBAL.innodb_file_format_check)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_format_check';
COUNT(VARIABLE_VALUE)
1
1 Expected
SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
@@innodb_file_format_check = @@GLOBAL.innodb_file_format_check
1
1 Expected
SELECT COUNT(@@innodb_file_format_check);
COUNT(@@innodb_file_format_check)
1
1 Expected
SELECT COUNT(@@local.innodb_file_format_check);
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_file_format_check);
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
COUNT(@@GLOBAL.innodb_file_format_check)
1
1 Expected
SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
ERROR 42S22: Unknown column 'innodb_file_format_check' in 'field list'
Expected error 'Readonly variable'
SET @start_global_value = @@global.innodb_file_format_max;
SELECT @start_global_value;
@start_global_value
Barracuda
Valid values are 'Antelope' and 'Barracuda'
SELECT @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
@@global.innodb_file_format_max in ('Antelope', 'Barracuda')
1
SELECT @@global.innodb_file_format_max;
@@global.innodb_file_format_max
Barracuda
SELECT @@session.innodb_file_format_max;
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable
SHOW global variables LIKE 'innodb_file_format_max';
Variable_name Value
innodb_file_format_max Barracuda
SHOW session variables LIKE 'innodb_file_format_max';
Variable_name Value
innodb_file_format_max Barracuda
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_MAX Barracuda
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_MAX Barracuda
SET global innodb_file_format_max='Antelope';
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_file_format_max;
@@global.innodb_file_format_max
Antelope
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_MAX Antelope
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_MAX Antelope
SET @@global.innodb_file_format_max='Barracuda';
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_file_format_max;
@@global.innodb_file_format_max
Barracuda
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_MAX Barracuda
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_MAX Barracuda
SET session innodb_file_format_max='Salmon';
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
SET @@session.innodb_file_format_max='Salmon';
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
SET global innodb_file_format_max=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
SET global innodb_file_format_max=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
SET global innodb_file_format_max='Salmon';
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Salmon'
SET @@global.innodb_file_format_max = @start_global_value;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_file_format_max;
@@global.innodb_file_format_max
Barracuda
SET @start_global_value = @@global.innodb_large_prefix;
SELECT @start_global_value;
@start_global_value
1
Valid values are 'ON' and 'OFF'
select @@global.innodb_large_prefix in (0, 1);
@@global.innodb_large_prefix in (0, 1)
1
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1
select @@session.innodb_large_prefix;
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable
show global variables like 'innodb_large_prefix';
Variable_name Value
innodb_large_prefix ON
show session variables like 'innodb_large_prefix';
Variable_name Value
innodb_large_prefix ON
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
set global innodb_large_prefix='OFF';
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
0
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX OFF
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX OFF
set @@global.innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
0
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX OFF
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX OFF
set @@global.innodb_large_prefix='ON';
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
set session innodb_large_prefix='OFF';
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_large_prefix='ON';
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
set global innodb_large_prefix=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix'
set global innodb_large_prefix=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix'
set global innodb_large_prefix=2;
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '2'
set global innodb_large_prefix=-3;
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '-3'
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
set global innodb_large_prefix='AUTO';
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of 'AUTO'
SET @@global.innodb_large_prefix = @start_global_value;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1
......@@ -902,48 +902,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FILE_FORMAT
SESSION_VALUE NULL
GLOBAL_VALUE Barracuda
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE Barracuda
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT File format to use for new tables in .ibd files.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FILE_FORMAT_CHECK
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Whether to perform system file format check.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FILE_FORMAT_MAX
SESSION_VALUE NULL
GLOBAL_VALUE Barracuda
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE Antelope
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT The highest file format in the tablespace.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FILE_PER_TABLE
SESSION_VALUE NULL
GLOBAL_VALUE ON
......@@ -1336,20 +1294,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LARGE_PREFIX
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Support large index prefix length of REC_VERSION_56_MAX_INDEX_COL_LEN (3072) bytes.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG
SESSION_VALUE NULL
GLOBAL_VALUE 0
......
# 2010-01-25 - Added
#
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_file_format;
SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are 'Antelope' and 'Barracuda'
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
select @@global.innodb_file_format;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_file_format;
show global variables like 'innodb_file_format';
show session variables like 'innodb_file_format';
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_file_format';
select * from information_schema.session_variables where variable_name='innodb_file_format';
--enable_warnings
#
# show that it's writable
#
set global innodb_file_format='Antelope';
select @@global.innodb_file_format;
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_file_format';
select * from information_schema.session_variables where variable_name='innodb_file_format';
--enable_warnings
set @@global.innodb_file_format='Barracuda';
select @@global.innodb_file_format;
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_file_format';
select * from information_schema.session_variables where variable_name='innodb_file_format';
--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_file_format='Salmon';
--error ER_GLOBAL_VARIABLE
set @@session.innodb_file_format='Salmon';
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_file_format=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_file_format=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_file_format='Salmon';
#
# Cleanup
#
SET @@global.innodb_file_format = @start_global_value;
SELECT @@global.innodb_file_format;
#
# 2011-08-02 - Added
#
--source include/not_embedded.inc
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_file_format_check;
SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are 'ON' and 'OFF'
SELECT @@global.innodb_file_format_check in (0, 1);
SELECT @@global.innodb_file_format_check;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.innodb_file_format_check;
SHOW global variables LIKE 'innodb_file_format_check';
SHOW session variables LIKE 'innodb_file_format_check';
--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_check';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_check';
--enable_warnings
#
# show that it's read only
#
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.innodb_file_format_check='Off';
--echo Expected error 'Read only variable'
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.innodb_file_format_check=1;
--echo Expected error 'Read only variable'
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.innodb_file_format_check=0;
--echo Expected error 'Read only variable'
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.innodb_file_format_check='On';
--echo Expected error 'Read only variable'
--error ER_GLOBAL_VARIABLE
SET session innodb_large_prefix='OFF';
--error ER_GLOBAL_VARIABLE
SET @@session.innodb_stats_on_metadata='ON';
#
# Check if the value in GLOBAL Table matches value in variable
#
--disable_warnings
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_format_check';
--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
--echo 1 Expected
--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_format_check';
--enable_warnings
--echo 1 Expected
#
# Check if accessing variable with and without GLOBAL point to same variable
#
SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
--echo 1 Expected
#
# Check if innodb_doublewrite can be accessed with and without @@ sign
#
SELECT COUNT(@@innodb_file_format_check);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_file_format_check);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@SESSION.innodb_file_format_check);
--echo Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
--echo Expected error 'Readonly variable'
#
# 2011-08-02 - Added
#
--source include/not_embedded.inc
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_file_format_max;
SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are 'Antelope' and 'Barracuda'
SELECT @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
SELECT @@global.innodb_file_format_max;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.innodb_file_format_max;
SHOW global variables LIKE 'innodb_file_format_max';
SHOW session variables LIKE 'innodb_file_format_max';
--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
--enable_warnings
#
# show that it's writable
#
SET global innodb_file_format_max='Antelope';
SELECT @@global.innodb_file_format_max;
--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
--enable_warnings
SET @@global.innodb_file_format_max='Barracuda';
SELECT @@global.innodb_file_format_max;
--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_file_format_max='Salmon';
--error ER_GLOBAL_VARIABLE
SET @@session.innodb_file_format_max='Salmon';
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_file_format_max=1.1;
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_file_format_max=1e1;
--error ER_WRONG_VALUE_FOR_VAR
SET global innodb_file_format_max='Salmon';
#
# Cleanup
#
SET @@global.innodb_file_format_max = @start_global_value;
SELECT @@global.innodb_file_format_max;
# 2010-01-25 - Added
#
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_large_prefix;
SELECT @start_global_value;
#
# exists as global only
#
--echo Valid values are 'ON' and 'OFF'
select @@global.innodb_large_prefix in (0, 1);
select @@global.innodb_large_prefix;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_large_prefix;
show global variables like 'innodb_large_prefix';
show session variables like 'innodb_large_prefix';
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
--enable_warnings
#
# show that it's writable
#
set global innodb_large_prefix='OFF';
select @@global.innodb_large_prefix;
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
--enable_warnings
set @@global.innodb_large_prefix=1;
select @@global.innodb_large_prefix;
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
--enable_warnings
set global innodb_large_prefix=0;
select @@global.innodb_large_prefix;
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
--enable_warnings
set @@global.innodb_large_prefix='ON';
select @@global.innodb_large_prefix;
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_large_prefix='OFF';
--error ER_GLOBAL_VARIABLE
set @@session.innodb_large_prefix='ON';
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_large_prefix=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_large_prefix=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix=-3;
select @@global.innodb_large_prefix;
--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix='AUTO';
#
# Cleanup
#
SET @@global.innodb_large_prefix = @start_global_value;
SELECT @@global.innodb_large_prefix;
--default-storage-engine=MyISAM
--loose-innodb-large-prefix=OFF
......@@ -7083,11 +7083,11 @@ btr_check_blob_fil_page_type(
ulint flags = fil_space_get_flags(space_id);
#ifndef UNIV_DEBUG /* Improve debug test coverage */
if (dict_tf_get_format(flags) == UNIV_FORMAT_A) {
if (!DICT_TF_HAS_ATOMIC_BLOBS(flags)) {
/* Old versions of InnoDB did not initialize
FIL_PAGE_TYPE on BLOB pages. Do not print
anything about the type mismatch when reading
a BLOB page that is in Antelope format.*/
a BLOB page that may be from old versions. */
return;
}
#endif /* !UNIV_DEBUG */
......
......@@ -574,7 +574,7 @@ dtuple_convert_big_rec(
return(NULL);
}
if (dict_table_get_format(index->table) < UNIV_FORMAT_B) {
if (!dict_table_has_atomic_blobs(index->table)) {
/* up to MySQL 5.1: store a 768-byte prefix locally */
local_len = BTR_EXTERN_FIELD_REF_SIZE
+ DICT_ANTELOPE_MAX_INDEX_COL_LEN;
......
......@@ -337,8 +337,8 @@ dict_boot(void)
dict_mem_table_add_col(table, heap, "ID", DATA_BINARY, 0, 8);
/* ROW_FORMAT = (N_COLS >> 31) ? COMPACT : REDUNDANT */
dict_mem_table_add_col(table, heap, "N_COLS", DATA_INT, 0, 4);
/* The low order bit of TYPE is always set to 1. If the format
is UNIV_FORMAT_B or higher, this field matches table->flags. */
/* The low order bit of TYPE is always set to 1. If ROW_FORMAT
is not REDUNDANT or COMPACT, this field matches table->flags. */
dict_mem_table_add_col(table, heap, "TYPE", DATA_INT, 0, 4);
dict_mem_table_add_col(table, heap, "MIX_ID", DATA_BINARY, 0, 0);
/* MIX_LEN may contain additional table flags when
......
......@@ -402,9 +402,8 @@ dict_build_tablespace_for_table(
ut_ad(!dict_table_is_temporary(table));
/* This table will need a new tablespace. */
ut_ad(dict_table_get_format(table) <= UNIV_FORMAT_MAX);
ut_ad(DICT_TF_GET_ZIP_SSIZE(table->flags) == 0
|| dict_table_get_format(table) >= UNIV_FORMAT_B);
|| dict_table_has_atomic_blobs(table));
/* Get a new tablespace ID */
dict_hdr_get_new_id(NULL, NULL, &space, table, false);
......
......@@ -1184,7 +1184,7 @@ dict_sys_tables_rec_read(
/* The low order bit of SYS_TABLES.TYPE is always set to 1. But in
dict_table_t::flags the low order bit is used to determine if the
row format is Redundant (0) or Compact (1) when the format is Antelope.
ROW_FORMAT=REDUNDANT (0) or anything else (1).
Read the 4 byte N_COLS field and look at the high order bit. It
should be set for COMPACT and later. It should not be set for
REDUNDANT. */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment