mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user