mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-29983 Deprecate innodb_file_per_table
Before commit6112853cda
in MySQL 4.1.1 introduced the parameter innodb_file_per_table, all InnoDB data was written to the InnoDB system tablespace (often named ibdata1). A serious design problem is that once the system tablespace has grown to some size, it cannot shrink even if the data inside it has been deleted. There are also other design problems, such as the server hang MDEV-29930 that should only be possible when using innodb_file_per_table=0 and innodb_undo_tablespaces=0 (storing both tables and undo logs in the InnoDB system tablespace). The parameter innodb_change_buffering was deprecated in commitb5852ffbee
. Starting with commitbaf276e6d4
(MDEV-19229) the number of innodb_undo_tablespaces can be increased, so that the undo logs can be moved out of the system tablespace of an existing installation. If all these things (tables, undo logs, and the change buffer) are removed from the InnoDB system tablespace, the only variable-size data structure inside it is the InnoDB data dictionary. DDL operations on .ibd files was optimized in commit86dc7b4d4c
(MDEV-24626). That should have removed any thinkable performance advantage of using innodb_file_per_table=0. Since there should be no benefit of setting innodb_file_per_table=0, the parameter should be deprecated. Starting with MySQL 5.6 and MariaDB Server 10.0, the default value is innodb_file_per_table=1.
This commit is contained in:
@@ -1 +1 @@
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
DROP TABLE IF EXISTS table6;
|
||||
|
@@ -1,9 +1,4 @@
|
||||
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_strict_mode=on;
|
||||
set old_alter_table=0;
|
||||
Warnings:
|
||||
Warning 1287 '@@old_alter_table' is deprecated and will be removed in a future release. Please use '@@alter_algorithm' instead
|
||||
CREATE TABLE bug53591(a text charset utf8 not null)
|
||||
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
|
||||
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
|
||||
@@ -12,5 +7,3 @@ SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
DROP TABLE bug53591;
|
||||
SET GLOBAL innodb_file_per_table=1;
|
||||
SET GLOBAL innodb_strict_mode=DEFAULT;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
SET GLOBAL tx_isolation='REPEATABLE-READ';
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
CREATE TABLE bug56680(
|
||||
a INT AUTO_INCREMENT PRIMARY KEY,
|
||||
b CHAR(1),
|
||||
|
@@ -1,4 +1,3 @@
|
||||
set global innodb_file_per_table=on;
|
||||
create table t1(a text) engine=innodb key_block_size=4;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
|
@@ -1,5 +1,4 @@
|
||||
SET default_storage_engine=InnoDB;
|
||||
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
|
||||
# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
|
||||
@@ -280,6 +279,8 @@ Level Code Message
|
||||
# innodb_file_per_table=OFF and that they can be set to default
|
||||
# values during strict mode.
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
|
||||
Got one of the listed errors
|
||||
@@ -354,9 +355,13 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@@ -367,6 +372,8 @@ ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
##################################################
|
||||
SET SESSION innodb_strict_mode = OFF;
|
||||
# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
|
||||
@@ -722,6 +729,8 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Compressed row_format=COMPRESSED key_block_size=2
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@@ -729,6 +738,8 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Compressed row_format=COMPRESSED key_block_size=2
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@@ -743,6 +754,8 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=DYNAMIC
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@@ -750,6 +763,8 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=DYNAMIC
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
|
@@ -1,5 +1,4 @@
|
||||
SET default_storage_engine=InnoDB;
|
||||
set global innodb_file_per_table=1;
|
||||
### Test 1 ###
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
|
||||
show warnings;
|
||||
@@ -449,4 +448,3 @@ create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
SET GLOBAL innodb_file_per_table=1;
|
||||
|
@@ -6,7 +6,10 @@ WHERE table_schema='mysqltest_innodb_zip';
|
||||
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 @save_fpt=@@GLOBAL.innodb_file_per_table;
|
||||
set global innodb_file_per_table=off;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
SET @@global.innodb_stats_on_metadata=ON;
|
||||
create table t0(a int primary key) engine=innodb row_format=compressed;
|
||||
Warnings:
|
||||
@@ -32,6 +35,8 @@ Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
set global innodb_file_per_table=on;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
create table t6(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
Warnings:
|
||||
@@ -153,7 +158,6 @@ count(*)
|
||||
1
|
||||
update t1 set c3 = repeat('E', 20000) where c1 = 1;
|
||||
drop table t1;
|
||||
set global innodb_file_per_table = on;
|
||||
set innodb_strict_mode = off;
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 0;
|
||||
drop table t1;
|
||||
@@ -247,6 +251,8 @@ Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql' and table_schema != 'sys' order by table_name;
|
||||
table_schema table_name row_format data_length index_length
|
||||
set global innodb_file_per_table = off;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
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;
|
||||
@@ -286,4 +292,8 @@ 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=@save_fpt;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata;
|
||||
DROP DATABASE mysqltest_innodb_zip;
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#
|
||||
# This tests the use of large blobs in InnoDB.
|
||||
#
|
||||
call mtr.add_suppression("InnoDB: Warning: a long semaphore wait");
|
||||
SET GLOBAL innodb_file_per_table = OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
#
|
||||
# System tablespace, Row Format = Redundant
|
||||
#
|
||||
@@ -26,6 +27,8 @@ INSERT INTO t1 VALUES (1, '');
|
||||
UPDATE t1 SET c2=@longblob;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
#
|
||||
# Separate tablespace, Row Format = Redundant
|
||||
#
|
||||
|
@@ -21,9 +21,9 @@
|
||||
-test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
|
||||
+test/t3 DEFAULT 2048 MYSQLD_DATADIR/test/t3.ibd
|
||||
test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
|
||||
innodb_temporary DEFAULT DEFAULT MYSQLD_DATADIR/ibtmp1
|
||||
DROP TABLE t1, t2, t3, t4;
|
||||
# Test 4) The maximum row size is dependent upon the page size.
|
||||
@@ -51,141 +51,90 @@
|
||||
@@ -52,141 +52,90 @@
|
||||
SET SESSION innodb_strict_mode = ON;
|
||||
CREATE TABLE t1 (
|
||||
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
|
||||
@@ -211,7 +211,7 @@
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@@ -217,15 +166,21 @@
|
||||
@@ -218,15 +167,21 @@
|
||||
DROP TABLE t1;
|
||||
SET SESSION innodb_strict_mode = OFF;
|
||||
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
|
||||
@@ -233,7 +233,7 @@
|
||||
SELECT table_name, row_format, create_options
|
||||
FROM information_schema.tables WHERE table_name = 't1';
|
||||
table_name row_format create_options
|
||||
@@ -269,6 +224,7 @@
|
||||
@@ -272,6 +227,7 @@
|
||||
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@@ -241,7 +241,7 @@
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
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
|
||||
@@ -276,105 +232,11 @@
|
||||
@@ -279,107 +235,13 @@
|
||||
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@@ -250,6 +250,8 @@
|
||||
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;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
-# 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
|
||||
@@ -348,7 +350,7 @@
|
||||
# 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,
|
||||
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
||||
@@ -389,10 +251,6 @@
|
||||
@@ -394,10 +256,6 @@
|
||||
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
|
||||
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
|
||||
CREATE INDEX t1a ON t1 (a(767));
|
||||
@@ -359,7 +361,7 @@
|
||||
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
||||
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
|
||||
CREATE INDEX t1f ON t1 (f(767));
|
||||
@@ -407,37 +265,15 @@
|
||||
@@ -412,37 +270,15 @@
|
||||
COMMIT;
|
||||
CREATE INDEX t1g ON t1 (g(767));
|
||||
UPDATE t1 SET g=@e;
|
||||
@@ -401,7 +403,7 @@
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@@ -463,28 +299,12 @@
|
||||
@@ -468,28 +304,12 @@
|
||||
`t` blob DEFAULT NULL,
|
||||
`u` blob DEFAULT NULL,
|
||||
KEY `t1a` (`a`(767)),
|
||||
@@ -432,7 +434,7 @@
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
|
||||
DROP TABLE t1;
|
||||
# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
|
||||
@@ -569,27 +389,25 @@
|
||||
@@ -574,27 +394,25 @@
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(
|
||||
c text NOT NULL, d text NOT NULL,
|
||||
|
@@ -21,9 +21,9 @@
|
||||
-test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
|
||||
+test/t3 DEFAULT 4096 MYSQLD_DATADIR/test/t3.ibd
|
||||
test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
|
||||
innodb_temporary DEFAULT DEFAULT MYSQLD_DATADIR/ibtmp1
|
||||
DROP TABLE t1, t2, t3, t4;
|
||||
# Test 4) The maximum row size is dependent upon the page size.
|
||||
@@ -53,133 +53,97 @@
|
||||
@@ -54,133 +54,97 @@
|
||||
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
|
||||
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
|
||||
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
|
||||
@@ -199,7 +199,7 @@
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SELECT table_name, row_format, create_options
|
||||
@@ -217,8 +181,11 @@
|
||||
@@ -218,8 +182,11 @@
|
||||
DROP TABLE t1;
|
||||
SET SESSION innodb_strict_mode = OFF;
|
||||
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
|
||||
@@ -211,7 +211,7 @@
|
||||
SELECT table_name, row_format, create_options
|
||||
FROM information_schema.tables WHERE table_name = 't1';
|
||||
table_name row_format create_options
|
||||
@@ -276,105 +243,11 @@
|
||||
@@ -279,107 +246,13 @@
|
||||
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@@ -220,6 +220,8 @@
|
||||
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;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
-# 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
|
||||
@@ -318,7 +320,7 @@
|
||||
# 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,
|
||||
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
||||
@@ -389,10 +262,6 @@
|
||||
@@ -394,10 +267,6 @@
|
||||
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
|
||||
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
|
||||
CREATE INDEX t1a ON t1 (a(767));
|
||||
@@ -329,7 +331,7 @@
|
||||
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
||||
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
|
||||
CREATE INDEX t1f ON t1 (f(767));
|
||||
@@ -407,30 +276,6 @@
|
||||
@@ -412,30 +281,6 @@
|
||||
COMMIT;
|
||||
CREATE INDEX t1g ON t1 (g(767));
|
||||
UPDATE t1 SET g=@e;
|
||||
@@ -360,7 +362,7 @@
|
||||
CREATE INDEX t1t ON t1 (t(767));
|
||||
BEGIN;
|
||||
UPDATE t1 SET t=@e;
|
||||
@@ -463,24 +308,8 @@
|
||||
@@ -468,24 +313,8 @@
|
||||
`t` blob DEFAULT NULL,
|
||||
`u` blob DEFAULT NULL,
|
||||
KEY `t1a` (`a`(767)),
|
||||
@@ -385,7 +387,7 @@
|
||||
KEY `t1t` (`t`(767)),
|
||||
KEY `t1u` (`u`(767)),
|
||||
KEY `t1ut` (`u`(767),`t`(767)),
|
||||
@@ -572,14 +401,14 @@
|
||||
@@ -577,14 +406,14 @@
|
||||
PRIMARY KEY (c(767),d(767)))
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
||||
Warnings:
|
||||
@@ -402,7 +404,7 @@
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(
|
||||
c text NOT NULL, d text NOT NULL,
|
||||
@@ -589,7 +418,7 @@
|
||||
@@ -594,7 +423,7 @@
|
||||
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
||||
Warnings:
|
||||
|
@@ -263,6 +263,8 @@ DROP TABLE t1;
|
||||
# Test 6) KEY_BLOCK_SIZE with innodb_file_per_table=OFF
|
||||
SET SESSION innodb_strict_mode = ON;
|
||||
SET GLOBAL innodb_file_per_table = OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
SHOW VARIABLES LIKE 'innodb_file_per_table';
|
||||
Variable_name Value
|
||||
innodb_file_per_table OFF
|
||||
@@ -281,6 +283,8 @@ 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;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
# 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
|
||||
|
@@ -3,7 +3,6 @@ SET default_storage_engine=InnoDB;
|
||||
# A series of tests to make sure tables are opened after restart.
|
||||
# Bug#13357607 Compressed file-per-table tablespaces fail to open
|
||||
#
|
||||
set global innodb_file_per_table=on;
|
||||
#
|
||||
# Create and insert records into a REDUNDANT row formatted table.
|
||||
#
|
||||
@@ -265,9 +264,6 @@ t7_restart#p#p1#sp#s3.ibd
|
||||
# Start the server and show that tables are still visible and accessible.
|
||||
#
|
||||
# restart
|
||||
SHOW VARIABLES LIKE 'innodb_file_per_table';
|
||||
Variable_name Value
|
||||
innodb_file_per_table ON
|
||||
SHOW CREATE TABLE t1_restart;
|
||||
Table Create Table
|
||||
t1_restart CREATE TABLE `t1_restart` (
|
||||
@@ -522,9 +518,6 @@ t7_restart#p#p1#sp#s3.ibd
|
||||
# Start the server and show the tablespaces.
|
||||
#
|
||||
# restart
|
||||
SHOW VARIABLES LIKE 'innodb_file_per_table';
|
||||
Variable_name Value
|
||||
innodb_file_per_table ON
|
||||
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
|
||||
Space_Name Page_Size Zip_Size Path
|
||||
test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
|
||||
@@ -723,9 +716,6 @@ t77_restart#p#p1#sp#s3.ibd
|
||||
# Restart the server
|
||||
#
|
||||
# restart
|
||||
SHOW VARIABLES LIKE 'innodb_file_per_table';
|
||||
Variable_name Value
|
||||
innodb_file_per_table ON
|
||||
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
|
||||
Space_Name Page_Size Zip_Size Path
|
||||
test/t4_restart DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd
|
||||
|
@@ -263,6 +263,8 @@ c1 c2
|
||||
unlink: t1.cfg
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_file_per_table = 0;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1(
|
||||
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
c2 INT) ENGINE=InnoDB;
|
||||
@@ -280,6 +282,8 @@ Warning 1809 Table `test`.`t1` in system tablespace
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_file_per_table = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1(
|
||||
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
c2 INT, INDEX idx(c2)) ENGINE=InnoDB
|
||||
|
@@ -8,7 +8,6 @@
|
||||
# check the size and compression stats of the table tab5
|
||||
#******************************************************************
|
||||
# set the flags
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
SET GLOBAL innodb_compression_level=0;
|
||||
#******************************************************************
|
||||
@@ -318,7 +317,6 @@ The size of the tab5.ibd file: 5242880
|
||||
# set the flag on (default off)
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
# set the flags
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_compression_level=0;
|
||||
# fetch the compressed page and check the stats
|
||||
# The stats figure may be different/same for each restart.
|
||||
@@ -655,7 +653,6 @@ The size of the tab5.ibd file: 2097152
|
||||
# set the flag on (default off)
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
# set the flags
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_compression_level=0;
|
||||
# fetch the compressed page and check the stats
|
||||
# The stats figure may be different/same for each restart.
|
||||
@@ -1615,7 +1612,6 @@ DROP TABLE tab5;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=0;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=1;
|
||||
# set the flags
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_compression_level=9;
|
||||
#******************************************************************
|
||||
# Test 2-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 1K
|
||||
@@ -1926,7 +1922,6 @@ The size of the tab5.ibd file: 65536
|
||||
# set the flag on (default off)
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
# set the flags
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_compression_level=9;
|
||||
# fetch the compressed page and check the stats
|
||||
# The stats figure may be different/same for each restart.
|
||||
@@ -2265,7 +2260,6 @@ The size of the tab5.ibd file: 65536
|
||||
# set the flag on (default off)
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
# set the flags
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_compression_level=9;
|
||||
# fetch the compressed page and check the stats
|
||||
# The stats figure may be different/same for each restart.
|
||||
@@ -4710,8 +4704,6 @@ SELECT @@innodb_cmp_per_index_enabled;
|
||||
@@innodb_cmp_per_index_enabled 1
|
||||
SELECT @@innodb_compression_failure_threshold_pct;
|
||||
@@innodb_compression_failure_threshold_pct 0
|
||||
SELECT @@innodb_file_per_table;
|
||||
@@innodb_file_per_table 1
|
||||
SELECT @@innodb_compression_level;
|
||||
@@innodb_compression_level 6
|
||||
#******************************************************************
|
||||
@@ -5022,7 +5014,6 @@ The size of the tab5.ibd file: 65536
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
# set the flags
|
||||
SET GLOBAL innodb_compression_failure_threshold_pct=0;
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
# fetch the compressed page and check the stats
|
||||
# The stats figure may be different/same for each restart.
|
||||
===============
|
||||
@@ -6289,7 +6280,6 @@ DROP TABLE tab5;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=OFF;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
# set the flags
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
SET GLOBAL innodb_compression_failure_threshold_pct=10;
|
||||
SET GLOBAL innodb_compression_level=Default;
|
||||
@@ -6298,8 +6288,6 @@ SELECT @@innodb_cmp_per_index_enabled;
|
||||
@@innodb_cmp_per_index_enabled 1
|
||||
SELECT @@innodb_compression_failure_threshold_pct;
|
||||
@@innodb_compression_failure_threshold_pct 10
|
||||
SELECT @@innodb_file_per_table;
|
||||
@@innodb_file_per_table 1
|
||||
SELECT @@innodb_compression_level;
|
||||
@@innodb_compression_level 6
|
||||
#******************************************************************
|
||||
@@ -6610,8 +6598,6 @@ The size of the tab5.ibd file: 65536
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=ON;
|
||||
# set the flags
|
||||
SET GLOBAL innodb_compression_failure_threshold_pct=10;
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
SET GLOBAL innodb_compression_failure_threshold_pct=10;
|
||||
# fetch the compressed page and check the stats
|
||||
# The stats figure may be different/same for each restart.
|
||||
===============
|
||||
@@ -7874,7 +7860,6 @@ DROP TABLE tab5;
|
||||
# reset the stat table before starting next testcase
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=0;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=1;
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET GLOBAL innodb_compression_level=default;
|
||||
SET GLOBAL innodb_compression_failure_threshold_pct=default;
|
||||
# create a table page size=1K
|
||||
@@ -7923,6 +7908,5 @@ compress_ops_ok 1
|
||||
DROP TABLE tab5, test.tab5;
|
||||
DROP DATABASE sb;
|
||||
# reset the flags
|
||||
SET GLOBAL innodb_file_per_table=default;
|
||||
SET GLOBAL innodb_cmp_per_index_enabled=default;
|
||||
SET GLOBAL innodb_compression_failure_threshold_pct=default;
|
||||
|
Reference in New Issue
Block a user