mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
This commit is contained in:
26
mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result
Normal file
26
mysql-test/suite/innodb_plugin/r/innodb-autoinc-18274.result
Normal file
@ -0,0 +1,26 @@
|
||||
drop table if exists t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||
DELETE FROM t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
2
|
||||
DROP TABLE t1;
|
30
mysql-test/suite/innodb_plugin/r/innodb-autoinc-56228.result
Normal file
30
mysql-test/suite/innodb_plugin/r/innodb-autoinc-56228.result
Normal file
@ -0,0 +1,30 @@
|
||||
DROP TABLE IF EXISTS t1_56228;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1_56228'
|
||||
DROP TABLE IF EXISTS t2_56228;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't2_56228'
|
||||
DROP FUNCTION IF EXISTS bug56228;
|
||||
Warnings:
|
||||
Note 1305 FUNCTION bug56228 does not exist
|
||||
CREATE TEMPORARY TABLE t1_56228(
|
||||
c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TEMPORARY TABLE t2_56228(
|
||||
c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE FUNCTION bug56228() RETURNS INT DETERMINISTIC
|
||||
BEGIN
|
||||
INSERT INTO t1_56228 VALUES(NULL);
|
||||
INSERT INTO t2_56228 VALUES(NULL);
|
||||
INSERT INTO t1_56228 VALUES(NULL);
|
||||
INSERT INTO t2_56228 VALUES(NULL);
|
||||
DROP TEMPORARY TABLE t1_56228;
|
||||
RETURN 42;
|
||||
END //
|
||||
SELECT bug56228();
|
||||
bug56228()
|
||||
42
|
||||
DROP FUNCTION bug56228;
|
||||
DROP TEMPORARY TABLE t2_56228;
|
||||
DROP TEMPORARY TABLE IF EXISTS t1_56228;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1_56228'
|
@ -471,17 +471,12 @@ SHOW VARIABLES LIKE "%auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 10
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
ERROR HY000: Failed to read auto-increment value from storage engine
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
18446744073709551603
|
||||
18446744073709551604
|
||||
18446744073709551606
|
||||
18446744073709551608
|
||||
18446744073709551610
|
||||
18446744073709551612
|
||||
18446744073709551614
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
@ -504,13 +499,12 @@ SHOW VARIABLES LIKE "%auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 5
|
||||
auto_increment_offset 7
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL), (NULL);
|
||||
ERROR HY000: Failed to read auto-increment value from storage engine
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
18446744073709551603
|
||||
18446744073709551607
|
||||
18446744073709551612
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
@ -572,12 +566,12 @@ SHOW VARIABLES LIKE "%auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 65535
|
||||
auto_increment_offset 65535
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
ERROR 22003: Out of range value for column 't1' at row 167
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
18446744073709551610
|
||||
18446744073709551615
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
|
854
mysql-test/suite/innodb_plugin/r/innodb-create-options.result
Executable file
854
mysql-test/suite/innodb_plugin/r/innodb-create-options.result
Executable file
@ -0,0 +1,854 @@
|
||||
SET storage_engine=InnoDB;
|
||||
SET GLOBAL innodb_file_format=`Barracuda`;
|
||||
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'
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
# 'FIXED' is sent to InnoDB since it is used by MyISAM.
|
||||
# But it is an invalid mode in InnoDB
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
|
||||
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 Compressed row_format=COMPRESSED
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Compact
|
||||
# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
|
||||
# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
|
||||
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 Compressed KEY_BLOCK_SIZE=16
|
||||
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 Compressed KEY_BLOCK_SIZE=16
|
||||
# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
|
||||
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 Compressed KEY_BLOCK_SIZE=16
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
|
||||
# Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
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
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 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
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
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
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=8;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
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 Compressed row_format=COMPRESSED
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=16;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
|
||||
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 Compressed KEY_BLOCK_SIZE=1
|
||||
# Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE
|
||||
# ALTER with each ROW_FORMAT
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`f1` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 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
|
||||
# Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
# 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;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
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: 1478)
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
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: 1478)
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
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 IF EXISTS 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 IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=8;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
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;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
|
||||
# and a valid non-zero KEY_BLOCK_SIZE are rejected with
|
||||
# innodb_file_per_table=OFF and that they can be set to default
|
||||
# values during strict mode.
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
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 IF EXISTS 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 IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=1;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 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
|
||||
ALTER TABLE t1 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
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT;
|
||||
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
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
##################################################
|
||||
SET SESSION innodb_strict_mode = OFF;
|
||||
# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
|
||||
# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
|
||||
# 'FIXED' is sent to InnoDB since it is used by MyISAM.
|
||||
# It is an invalid mode in InnoDB, use COMPACT
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
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=FIXED
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
|
||||
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 Compressed row_format=COMPRESSED
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
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=FIXED
|
||||
# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
|
||||
# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=1
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=2
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=4
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
|
||||
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 Compressed KEY_BLOCK_SIZE=16
|
||||
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 Compressed KEY_BLOCK_SIZE=16
|
||||
# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
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=FIXED KEY_BLOCK_SIZE=1
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=2
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=4
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=8
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
|
||||
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 Compressed KEY_BLOCK_SIZE=16
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
|
||||
# Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
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
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=2
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=2
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=2
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8;
|
||||
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 Compressed KEY_BLOCK_SIZE=8
|
||||
# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE
|
||||
# ALTER with each ROW_FORMAT
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`f1` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=16
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=16
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
|
||||
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 KEY_BLOCK_SIZE=16
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
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
|
||||
ALTER TABLE t1 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
|
||||
# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
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 Compact 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.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
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=COMPACT.
|
||||
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=COMPACT.
|
||||
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=COMPRESSED KEY_BLOCK_SIZE=1
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
ALTER TABLE t1 ADD COLUMN f2 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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
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=Antelope;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
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=DYNAMIC
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
ALTER TABLE t1 ADD COLUMN f2 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
|
||||
# Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
|
||||
valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF
|
||||
and then used again when innodb_file_per_table=ON.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
|
||||
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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
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=COMPRESSED KEY_BLOCK_SIZE=2
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
ALTER TABLE t1 ADD COLUMN f2 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 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
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_per_table=OFF;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
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=DYNAMIC
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
ALTER TABLE t1 ADD COLUMN f2 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
|
||||
# Cleanup
|
||||
DROP TABLE IF EXISTS t1;
|
@ -83,8 +83,6 @@ test t8 Compact
|
||||
test t9 Compact
|
||||
drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
|
||||
alter table t1 key_block_size=0;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0.
|
||||
alter table t1 row_format=dynamic;
|
||||
SELECT table_schema, table_name, row_format
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
@ -190,16 +188,9 @@ 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;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0.
|
||||
drop table t1;
|
||||
set innodb_strict_mode = on;
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 0;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 0. Valid values are [1, 2, 4, 8, 16]
|
||||
Error 1005 Can't create table 'test.t1' (errno: 1478)
|
||||
create table t2 (id int primary key) engine = innodb key_block_size = 9;
|
||||
ERROR HY000: Can't create table 'test.t2' (errno: 1478)
|
||||
show warnings;
|
||||
@ -218,6 +209,7 @@ create table t11(id int primary key) engine = innodb row_format = redundant;
|
||||
SELECT table_schema, table_name, row_format
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t1 Compact
|
||||
test t10 Compact
|
||||
test t11 Redundant
|
||||
test t3 Compressed
|
||||
@ -227,7 +219,7 @@ test t6 Compressed
|
||||
test t7 Compressed
|
||||
test t8 Compressed
|
||||
test t9 Dynamic
|
||||
drop table t3, t4, t5, t6, t7, t8, t9, t10, t11;
|
||||
drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11;
|
||||
create table t1 (id int primary key) engine = innodb
|
||||
key_block_size = 8 row_format = compressed;
|
||||
create table t2 (id int primary key) engine = innodb
|
||||
@ -253,16 +245,12 @@ Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table 'test.t4' (errno: 1478)
|
||||
create table t5 (id int primary key) engine = innodb
|
||||
key_block_size = 8 row_format = default;
|
||||
ERROR HY000: Can't create table 'test.t5' (errno: 1478)
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table 'test.t5' (errno: 1478)
|
||||
SELECT table_schema, table_name, row_format
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t1 Compressed
|
||||
drop table t1;
|
||||
test t5 Compressed
|
||||
drop table t1, t5;
|
||||
create table t1 (id int primary key) engine = innodb
|
||||
key_block_size = 9 row_format = redundant;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
|
@ -1,5 +1,8 @@
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
drop database if exists mysqltest;
|
||||
CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB;
|
||||
INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000));
|
||||
UPDATE bug58912 SET a=REPEAT('a',7999);
|
||||
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
|
||||
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
|
||||
select id, code, name from t1 order by id;
|
||||
@ -1676,10 +1679,10 @@ variable_value - @innodb_rows_deleted_orig
|
||||
71
|
||||
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
|
||||
variable_value - @innodb_rows_inserted_orig
|
||||
1066
|
||||
1067
|
||||
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
|
||||
variable_value - @innodb_rows_updated_orig
|
||||
865
|
||||
866
|
||||
SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
|
||||
variable_value - @innodb_row_lock_waits_orig
|
||||
0
|
||||
@ -3239,3 +3242,4 @@ Variable_name Value
|
||||
Handler_update 1
|
||||
Variable_name Value
|
||||
Handler_delete 1
|
||||
DROP TABLE bug58912;
|
||||
|
27
mysql-test/suite/innodb_plugin/r/innodb_bug53046.result
Normal file
27
mysql-test/suite/innodb_plugin/r/innodb_bug53046.result
Normal file
@ -0,0 +1,27 @@
|
||||
CREATE TABLE bug53046_1 (c1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
CREATE TABLE bug53046_2 (c2 INT PRIMARY KEY,
|
||||
FOREIGN KEY (c2) REFERENCES bug53046_1(c1)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE) ENGINE=INNODB;
|
||||
INSERT INTO bug53046_1 VALUES (1);
|
||||
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
||||
FROM bug53046_1;
|
||||
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
||||
FROM bug53046_1;
|
||||
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
||||
FROM bug53046_1;
|
||||
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
||||
FROM bug53046_1;
|
||||
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
||||
FROM bug53046_1;
|
||||
INSERT INTO bug53046_2 VALUES (1), (2);
|
||||
ANALYZE TABLE bug53046_1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.bug53046_1 analyze status OK
|
||||
SHOW TABLE STATUS LIKE 'bug53046_1';
|
||||
UPDATE bug53046_1 SET c1 = c1 - 1;
|
||||
DELETE FROM bug53046_1;
|
||||
INSERT INTO bug53046_1 VALUES (1);
|
||||
INSERT INTO bug53046_2 VALUES (1);
|
||||
TRUNCATE TABLE bug53046_2;
|
||||
DROP TABLE bug53046_2;
|
||||
DROP TABLE bug53046_1;
|
@ -1,91 +0,0 @@
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET innodb_strict_mode=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=COMPRESSED
|
||||
ALTER TABLE bug54679 ADD COLUMN b INT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=COMPRESSED
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compact
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed key_block_size=1
|
||||
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Redundant row_format=REDUNDANT
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=REDUNDANT key_block_size=2
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table 'test.bug54679' (errno: 1478)
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table 'test.bug54679' (errno: 1478)
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
DROP TABLE bug54679;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_format_check=Antelope;
|
||||
SET GLOBAL innodb_file_per_table=0;
|
@ -1,294 +0,0 @@
|
||||
SET storage_engine=InnoDB;
|
||||
SET GLOBAL innodb_file_format=`Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET SESSION innodb_strict_mode = ON;
|
||||
# Test 1) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'bug56632'
|
||||
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
ERROR HY000: Can't create table 'test.bug56632' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table 'test.bug56632' (errno: 1478)
|
||||
# Test 2) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'bug56632'
|
||||
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact row_format=COMPACT
|
||||
ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compressed row_format=COMPACT key_block_size=1
|
||||
# Test 3) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compressed key_block_size=1
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compressed key_block_size=1
|
||||
# Test 4) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT );
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact
|
||||
# Test 5) CREATE with KEY_BLOCK_SIZE=3 (invalid).
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
|
||||
ERROR HY000: Can't create table 'test.bug56632' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 3. Valid values are [1, 2, 4, 8, 16]
|
||||
Error 1005 Can't create table 'test.bug56632' (errno: 1478)
|
||||
SET SESSION innodb_strict_mode = OFF;
|
||||
# Test 6) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'bug56632'
|
||||
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact row_format=COMPACT key_block_size=1
|
||||
ALTER TABLE bug56632 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`f1` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact row_format=COMPACT key_block_size=1
|
||||
# Test 7) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact row_format=COMPACT
|
||||
ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compressed row_format=COMPACT key_block_size=1
|
||||
# Test 8) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compressed key_block_size=1
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact row_format=COMPACT key_block_size=1
|
||||
# Test 9) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT );
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact row_format=COMPACT key_block_size=1
|
||||
# Test 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact key_block_size=3
|
||||
ALTER TABLE bug56632 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`f1` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact key_block_size=3
|
||||
# Test 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT.
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact key_block_size=3
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=3
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact row_format=COMPACT key_block_size=3
|
||||
# Test 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1.
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=3.
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=3
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compact key_block_size=3
|
||||
ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SHOW CREATE TABLE bug56632;
|
||||
Table Create Table
|
||||
bug56632 CREATE TABLE `bug56632` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug56632 Compressed key_block_size=1
|
||||
# Cleanup
|
||||
DROP TABLE IF EXISTS bug56632;
|
@ -74,3 +74,11 @@ a b
|
||||
4 14
|
||||
5 15
|
||||
drop table bug38999_1,bug38999_2;
|
||||
#
|
||||
# Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb
|
||||
#
|
||||
CREATE TABLE t1(f1 INT) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
|
||||
ERROR 21000: Operand should contain 1 column(s)
|
||||
DROP TABLE t1;
|
||||
|
@ -2410,4 +2410,42 @@ PACK_KEYS=0;
|
||||
CREATE INDEX a ON t1 (a);
|
||||
CREATE INDEX c on t1 (c);
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
a int,
|
||||
b int,
|
||||
INDEX idx(a))
|
||||
ENGINE=INNODB;
|
||||
INSERT INTO t1(a,b) VALUES
|
||||
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
|
||||
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
|
||||
(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
|
||||
(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
|
||||
INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1 VALUES (1000000, 0, 0);
|
||||
SET SESSION sort_buffer_size = 1024*36;
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM
|
||||
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
|
||||
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 3537 Using sort_union(idx,PRIMARY); Using where
|
||||
SELECT COUNT(*) FROM
|
||||
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
|
||||
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
|
||||
COUNT(*)
|
||||
1537
|
||||
SET SESSION sort_buffer_size = DEFAULT;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
29
mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test
Normal file
29
mysql-test/suite/innodb_plugin/t/innodb-autoinc-18274.test
Normal file
@ -0,0 +1,29 @@
|
||||
-- source include/have_innodb_plugin.inc
|
||||
# embedded server ignores 'delayed', so skip this
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug #18274 InnoDB auto_increment field reset on OPTIMIZE TABLE
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
SHOW CREATE TABLE t1;
|
||||
DELETE FROM t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval set global innodb_file_format_check=$innodb_file_format_check_orig;
|
@ -0,0 +1 @@
|
||||
--innodb_autoinc_lock_mode=0
|
42
mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228.test
Normal file
42
mysql-test/suite/innodb_plugin/t/innodb-autoinc-56228.test
Normal file
@ -0,0 +1,42 @@
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
|
||||
|
||||
##
|
||||
# Bug #56228: dropping tables from within an active statement crashes server
|
||||
#
|
||||
DROP TABLE IF EXISTS t1_56228;
|
||||
DROP TABLE IF EXISTS t2_56228;
|
||||
DROP FUNCTION IF EXISTS bug56228;
|
||||
|
||||
CREATE TEMPORARY TABLE t1_56228(
|
||||
c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TEMPORARY TABLE t2_56228(
|
||||
c1 iNT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
|
||||
|
||||
DELIMITER //;
|
||||
|
||||
CREATE FUNCTION bug56228() RETURNS INT DETERMINISTIC
|
||||
BEGIN
|
||||
INSERT INTO t1_56228 VALUES(NULL);
|
||||
INSERT INTO t2_56228 VALUES(NULL);
|
||||
INSERT INTO t1_56228 VALUES(NULL);
|
||||
INSERT INTO t2_56228 VALUES(NULL);
|
||||
DROP TEMPORARY TABLE t1_56228;
|
||||
RETURN 42;
|
||||
END //
|
||||
|
||||
DELIMITER ;//
|
||||
|
||||
SELECT bug56228();
|
||||
|
||||
DROP FUNCTION bug56228;
|
||||
DROP TEMPORARY TABLE t2_56228;
|
||||
DROP TEMPORARY TABLE IF EXISTS t1_56228;
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval set global innodb_file_format_check=$innodb_file_format_check_orig;
|
@ -293,21 +293,8 @@ INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
# This should fail because of overflow but it doesn't, it seems to be
|
||||
# a MySQL server bug. It wraps around to 0 for the last value.
|
||||
# See MySQL Bug# 39828
|
||||
#
|
||||
# Instead of wrapping around, it asserts when MySQL is compiled --with-debug
|
||||
# (see sql/handler.cc:handler::update_auto_increment()). Don't test for
|
||||
# overflow until Bug #39828 is fixed.
|
||||
#
|
||||
# Since this asserts when compiled --with-debug, we can't properly test this
|
||||
# until Bug #39828 is fixed. For now, this test is meaningless.
|
||||
#if Bug #39828 is fixed
|
||||
#INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
#else
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
#endif
|
||||
--error ER_AUTOINC_READ_FAILED
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
@ -325,20 +312,8 @@ INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
# This should fail because of overflow but it doesn't. It fails with
|
||||
# a duplicate entry message because of a MySQL server bug, it wraps
|
||||
# around. See MySQL Bug# 39828, once MySQL fix the bug we can replace
|
||||
# the ER_DUP_ENTRY, 1062 below with the appropriate error message
|
||||
#
|
||||
# Since this asserts when compiled --with-debug, we can't properly test this
|
||||
# until Bug #39828 is fixed. For now, this test is meaningless.
|
||||
#if Bug #39828 is fixed
|
||||
# Still need to fix this error code, error should mention overflow
|
||||
#-- error ER_DUP_ENTRY,1062
|
||||
#INSERT INTO t1 VALUES (NULL),(NULL), (NULL);
|
||||
#else
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
#endif
|
||||
--error ER_AUTOINC_READ_FAILED
|
||||
INSERT INTO t1 VALUES (NULL),(NULL), (NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
@ -376,20 +351,8 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
# This should fail because of overflow but it doesn't. It wraps around
|
||||
# and the autoinc values look bogus too.
|
||||
# See MySQL Bug# 39828, once MySQL fix the bug we can enable the error
|
||||
# code expected test.
|
||||
# -- error ER_AUTOINC_READ_FAILED,1467
|
||||
#
|
||||
# Since this asserts when compiled --with-debug, we can't properly test this
|
||||
# until Bug #39828 is fixed. For now, this test is meaningless.
|
||||
#if Bug #39828 is fixed
|
||||
#-- error ER_AUTOINC_READ_FAILED,1467
|
||||
#INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
#else
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
#endif
|
||||
--error ER_WARN_DATA_OUT_OF_RANGE
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
575
mysql-test/suite/innodb_plugin/t/innodb-create-options.test
Executable file
575
mysql-test/suite/innodb_plugin/t/innodb-create-options.test
Executable file
@ -0,0 +1,575 @@
|
||||
# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE
|
||||
# Related bugs;
|
||||
# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact
|
||||
# Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error
|
||||
# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED
|
||||
# Rules for interpreting CREATE_OPTIONS
|
||||
# 1) Create options on an ALTER are added to the options on the
|
||||
# previous CREATE or ALTER statements.
|
||||
# 2) KEY_BLOCK_SIZE=0 is considered a unspecified value.
|
||||
# If the current ROW_FORMAT has explicitly been set to COMPRESSED,
|
||||
# InnoDB will use a default value of 8. Otherwise KEY_BLOCK_SIZE
|
||||
# will not be used.
|
||||
# 3) ROW_FORMAT=DEFAULT allows InnoDB to choose its own default, COMPACT.
|
||||
# 4) ROW_FORMAT=DEFAULT and KEY_BLOCK_SIZE=0 can be used at any time to
|
||||
# unset or erase the values persisted in the MySQL dictionary and
|
||||
# by SHOW CTREATE TABLE.
|
||||
# 5) When incompatible values for ROW_FORMAT and KEY_BLOCK_SIZE are
|
||||
# both explicitly given, the ROW_FORMAT is always used in non-strict
|
||||
# mode.
|
||||
# 6) InnoDB will automatically convert a table to COMPRESSED only if a
|
||||
# valid non-zero KEY_BLOCK_SIZE has been given and ROW_FORMAT=DEFAULT
|
||||
# or has not been used on a previous CREATE TABLE or ALTER TABLE.
|
||||
# 7) InnoDB strict mode is designed to prevent incompatible create
|
||||
# options from being used together.
|
||||
# 8) The non-strict behavior is intended to permit you to import a
|
||||
# mysqldump file into a database that does not support compressed
|
||||
# tables, even if the source database contained compressed tables.
|
||||
# All invalid values and/or incompatible combinations of ROW_FORMAT
|
||||
# and KEY_BLOCK_SIZE are automatically corrected
|
||||
#
|
||||
# *** innodb_strict_mode=ON ***
|
||||
# 1) Valid ROW_FORMATs are COMPRESSED, COMPACT, DEFAULT, DYNAMIC
|
||||
# & REDUNDANT. All others are rejected.
|
||||
# 2) Valid KEY_BLOCK_SIZEs are 0,1,2,4,8,16. All others are rejected.
|
||||
# 3) KEY_BLOCK_SIZE=0 can be used to set it to 'unspecified'.
|
||||
# 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 and
|
||||
# ROW_FORMAT=DYNAMIC are incompatible with innodb_file_format=Antelope
|
||||
# and 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.
|
||||
# 7) KEY_BLOCK_SIZE on an ALTER can occur without a ROW_FORMAT if the
|
||||
# previous ROW_FORMAT was DEFAULT, COMPRESSED, or unspecified.
|
||||
#
|
||||
# *** innodb_strict_mode=OFF ***
|
||||
# 1. Ignore a bad KEY_BLOCK_SIZE, defaulting it to 8.
|
||||
# 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
|
||||
# it will ignore ROW_FORMAT=COMPRESSED or DYNAMIC and it will
|
||||
# ignore all non-zero KEY_BLOCK_SIZEs.
|
||||
#
|
||||
# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors"
|
||||
|
||||
-- source include/have_innodb_plugin.inc
|
||||
SET 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_format_check_orig=`select @@innodb_file_format_check`;
|
||||
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
|
||||
LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
|
||||
--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.
|
||||
SET SESSION innodb_strict_mode = ON;
|
||||
|
||||
--echo # Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
|
||||
--echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM.
|
||||
--echo # But it is an invalid mode in InnoDB
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
|
||||
SHOW WARNINGS;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
|
||||
|
||||
--echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
|
||||
--echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
|
||||
SHOW WARNINGS;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
|
||||
SHOW WARNINGS;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
|
||||
--echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
|
||||
--echo # Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=8;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
--echo # Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE
|
||||
--echo # ALTER with each ROW_FORMAT
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2;
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW CREATE TABLE t1;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
--echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
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;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
|
||||
SHOW WARNINGS;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
SHOW WARNINGS;
|
||||
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 IF EXISTS 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 IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=8;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
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 & DYNAMIC and
|
||||
--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with
|
||||
--echo # innodb_file_per_table=OFF and that they can be set to default
|
||||
--echo # values during strict mode.
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
SHOW WARNINGS;
|
||||
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 IF EXISTS 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 IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=1;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
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_per_table=ON;
|
||||
|
||||
--echo ##################################################
|
||||
SET SESSION innodb_strict_mode = OFF;
|
||||
|
||||
--echo # Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
|
||||
--echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
|
||||
--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM.
|
||||
--echo # It is an invalid mode in InnoDB, use COMPACT
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
--echo # Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
|
||||
--echo # KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
|
||||
--echo # Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT );
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
|
||||
--echo # Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
--echo # Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE
|
||||
--echo # ALTER with each ROW_FORMAT
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
--echo # Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8
|
||||
DROP TABLE IF EXISTS t1;
|
||||
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.
|
||||
DROP TABLE IF EXISTS 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';
|
||||
DROP TABLE IF EXISTS 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';
|
||||
|
||||
--echo # Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
|
||||
--echo valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF
|
||||
--echo and then used again when innodb_file_per_table=ON.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
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_per_table=ON;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE IF EXISTS 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_per_table=OFF;
|
||||
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_per_table=ON;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
|
||||
--echo # Cleanup
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig;
|
||||
EVAL SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
|
||||
EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
|
||||
--enable_query_log
|
||||
|
@ -173,9 +173,7 @@ set innodb_strict_mode = on;
|
||||
|
||||
#Test different values of KEY_BLOCK_SIZE
|
||||
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 0;
|
||||
show warnings;
|
||||
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table t2 (id int primary key) engine = innodb key_block_size = 9;
|
||||
@ -196,7 +194,7 @@ create table t11(id int primary key) engine = innodb row_format = redundant;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
drop table t3, t4, t5, t6, t7, t8, t9, t10, t11;
|
||||
drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11;
|
||||
|
||||
#test different values of ROW_FORMAT with KEY_BLOCK_SIZE
|
||||
create table t1 (id int primary key) engine = innodb
|
||||
@ -217,14 +215,12 @@ create table t4 (id int primary key) engine = innodb
|
||||
key_block_size = 8 row_format = dynamic;
|
||||
show warnings;
|
||||
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table t5 (id int primary key) engine = innodb
|
||||
key_block_size = 8 row_format = default;
|
||||
show warnings;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
drop table t1;
|
||||
drop table t1, t5;
|
||||
|
||||
#test multiple errors
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
|
@ -45,6 +45,15 @@ drop table if exists t1,t2,t3,t4;
|
||||
drop database if exists mysqltest;
|
||||
--enable_warnings
|
||||
|
||||
# Bug#58912 InnoDB unnecessarily avoids update-in-place on column prefixes
|
||||
CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB;
|
||||
INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000));
|
||||
UPDATE bug58912 SET a=REPEAT('a',7999);
|
||||
# The above statements used to trigger a failure during purge when
|
||||
# Bug#55284 was fixed while Bug#58912 was not. Defer the DROP TABLE,
|
||||
# so that purge gets a chance to run (and a double free of the
|
||||
# off-page column can be detected, if one is to occur.)
|
||||
|
||||
#
|
||||
# Small basic test with ignore
|
||||
#
|
||||
@ -2543,6 +2552,9 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
|
||||
|
||||
-- enable_query_log
|
||||
|
||||
# Clean up after the Bug#55284/Bug#58912 test case.
|
||||
DROP TABLE bug58912;
|
||||
|
||||
#######################################################################
|
||||
# #
|
||||
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
|
||||
|
48
mysql-test/suite/innodb_plugin/t/innodb_bug53046.test
Normal file
48
mysql-test/suite/innodb_plugin/t/innodb_bug53046.test
Normal file
@ -0,0 +1,48 @@
|
||||
#
|
||||
# http://bugs.mysql.com/53046
|
||||
# dict_update_statistics_low can still be run concurrently on same table
|
||||
#
|
||||
# This is a symbolic test, it would not fail if the bug is present.
|
||||
# Rather those SQL commands have been used during manual testing under
|
||||
# UNIV_DEBUG & UNIV_SYNC_DEBUG to test all changed codepaths for locking
|
||||
# correctness.
|
||||
#
|
||||
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
CREATE TABLE bug53046_1 (c1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
CREATE TABLE bug53046_2 (c2 INT PRIMARY KEY,
|
||||
FOREIGN KEY (c2) REFERENCES bug53046_1(c1)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE) ENGINE=INNODB;
|
||||
|
||||
INSERT INTO bug53046_1 VALUES (1);
|
||||
let $i = 5;
|
||||
while ($i) {
|
||||
eval INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
||||
FROM bug53046_1;
|
||||
dec $i;
|
||||
}
|
||||
|
||||
INSERT INTO bug53046_2 VALUES (1), (2);
|
||||
|
||||
# CREATE TABLE innodb_table_monitor (a int) ENGINE=INNODB;
|
||||
# wait more than 1 minute and observe the mysqld output
|
||||
# DROP TABLE innodb_table_monitor;
|
||||
|
||||
ANALYZE TABLE bug53046_1;
|
||||
|
||||
# this prints create time and other nondeterministic data
|
||||
-- disable_result_log
|
||||
SHOW TABLE STATUS LIKE 'bug53046_1';
|
||||
-- enable_result_log
|
||||
|
||||
UPDATE bug53046_1 SET c1 = c1 - 1;
|
||||
|
||||
DELETE FROM bug53046_1;
|
||||
|
||||
INSERT INTO bug53046_1 VALUES (1);
|
||||
INSERT INTO bug53046_2 VALUES (1);
|
||||
TRUNCATE TABLE bug53046_2;
|
||||
|
||||
DROP TABLE bug53046_2;
|
||||
DROP TABLE bug53046_1;
|
@ -1,97 +0,0 @@
|
||||
# Test Bug #54679 alter table causes compressed row_format to revert to compact
|
||||
|
||||
--source include/have_innodb_plugin.inc
|
||||
|
||||
let $file_format=`select @@innodb_file_format`;
|
||||
let $file_format_check=`select @@innodb_file_format_check`;
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET innodb_strict_mode=ON;
|
||||
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# The ROW_FORMAT of the table should be preserved when it is not specified
|
||||
# in ALTER TABLE.
|
||||
ALTER TABLE bug54679 ADD COLUMN b INT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
DROP TABLE bug54679;
|
||||
|
||||
# Check that the ROW_FORMAT conversion to/from COMPRESSED works.
|
||||
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# KEY_BLOCK_SIZE implies COMPRESSED.
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# This prevents other than REDUNDANT or COMPACT ROW_FORMAT for new tables.
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
# This will prevent ROW_FORMAT=COMPRESSED, because the system tablespace
|
||||
# cannot be compressed.
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
DROP TABLE bug54679;
|
||||
|
||||
EVAL SET GLOBAL innodb_file_format=$file_format;
|
||||
EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
|
@ -1,216 +0,0 @@
|
||||
#
|
||||
# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED
|
||||
# http://bugs.mysql.com/56632
|
||||
#
|
||||
# Innodb automatically uses compressed mode when the KEY_BLOCK_SIZE
|
||||
# parameter is used, except if the ROW_FORMAT is also specified, in
|
||||
# which case the KEY_BLOCK_SIZE is ignored and a warning is shown.
|
||||
# But Innodb was getting confused when neither of those parameters
|
||||
# was used on the ALTER statement after they were both used on the
|
||||
# CREATE.
|
||||
#
|
||||
# This will test the results of all 4 combinations of these two
|
||||
# parameters of the CREATE and ALTER.
|
||||
#
|
||||
# Tests 1-5 use INNODB_STRICT_MODE=1 which returns an error
|
||||
# if there is anything wrong with the statement.
|
||||
#
|
||||
# 1) CREATE with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1, ALTER with neither.
|
||||
# Result; CREATE; fails with error ER_CANT_CREATE_TABLE
|
||||
# 2) CREATE with ROW_FORMAT=COMPACT, ALTER with KEY_BLOCK_SIZE=1
|
||||
# Result; CREATE succeeds,
|
||||
# ALTER quietly converts ROW_FORMAT to compressed.
|
||||
# 3) CREATE with KEY_BLOCK_SIZE=1, ALTER with ROW_FORMAT=COMPACT
|
||||
# Result; CREATE quietly converts ROW_FORMAT to compressed,
|
||||
# ALTER fails with error ER_CANT_CREATE_TABLE.
|
||||
# 4) CREATE with neither, ALTER with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1
|
||||
# Result; CREATE succeeds,
|
||||
# ALTER; fails with error ER_CANT_CREATE_TABLE
|
||||
# 5) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
|
||||
# Result; CREATE; fails with error ER_CANT_CREATE_TABLE
|
||||
#
|
||||
# Tests 6-11 use INNODB_STRICT_MODE=0 which automatically makes
|
||||
# adjustments if the prameters are incompatible.
|
||||
#
|
||||
# 6) CREATE with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1, ALTER with neither.
|
||||
# Result; CREATE succeeds, warns that KEY_BLOCK_SIZE is ignored.
|
||||
# ALTER succeeds, no warnings.
|
||||
# 7) CREATE with ROW_FORMAT=COMPACT, ALTER with KEY_BLOCK_SIZE=1
|
||||
# Result; CREATE succeeds,
|
||||
# ALTER quietly converts ROW_FORMAT to compressed.
|
||||
# 8) CREATE with KEY_BLOCK_SIZE=1, ALTER with ROW_FORMAT=COMPACT
|
||||
# Result; CREATE quietly converts ROW_FORMAT to compressed,
|
||||
# ALTER succeeds, warns that KEY_BLOCK_SIZE is ignored.
|
||||
# 9) CREATE with neither, ALTER with ROW_FORMAT=COMPACT & KEY_BLOCK_SIZE=1
|
||||
# Result; CREATE succeeds,
|
||||
# ALTER succeeds, warns that KEY_BLOCK_SIZE is ignored.
|
||||
# 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
|
||||
# Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
|
||||
# ALTER succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
|
||||
# 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT.
|
||||
# Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
|
||||
# ALTER succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
|
||||
# 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1.
|
||||
# Result; CREATE succeeds, warns that KEY_BLOCK_SIZE=3 is ignored.
|
||||
# ALTER succeeds, quietly converts ROW_FORMAT to compressed.
|
||||
|
||||
-- source include/have_innodb_plugin.inc
|
||||
|
||||
SET 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_format_check_orig=`select @@innodb_file_format_check`;
|
||||
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
|
||||
LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_file_format=`Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
|
||||
# Innodb strict mode will cause an error on the CREATE or ALTER when;
|
||||
# 1. both ROW_FORMAT=COMPACT and KEY_BLOCK_SIZE=1,
|
||||
# 2. KEY_BLOCK_SIZE is not a valid number (0,1,2,4,8,16).
|
||||
# With innodb_strict_mode = OFF, These errors are corrected
|
||||
# and just a warning is returned.
|
||||
SET SESSION innodb_strict_mode = ON;
|
||||
|
||||
--echo # Test 1) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
|
||||
--echo # Test 2) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 3) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
--disable_result_log
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
|
||||
--enable_result_log
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 4) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT );
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
--disable_result_log
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
--enable_result_log
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 5) CREATE with KEY_BLOCK_SIZE=3 (invalid).
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
|
||||
SHOW WARNINGS;
|
||||
|
||||
SET SESSION innodb_strict_mode = OFF;
|
||||
|
||||
--echo # Test 6) CREATE with ROW_FORMAT & KEY_BLOCK_SIZE, ALTER with neither
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
ALTER TABLE bug56632 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 7) CREATE with ROW_FORMAT, ALTER with KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 8) CREATE with KEY_BLOCK_SIZE, ALTER with ROW_FORMAT
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 9) CREATE with neither, ALTER with ROW_FORMAT & KEY_BLOCK_SIZE
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT );
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 10) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with neither.
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
ALTER TABLE bug56632 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 11) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with ROW_FORMAT=COMPACT.
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
ALTER TABLE bug56632 ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Test 12) CREATE with KEY_BLOCK_SIZE=3 (invalid), ALTER with KEY_BLOCK_SIZE=1.
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
CREATE TABLE bug56632 ( i INT ) KEY_BLOCK_SIZE=3;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
ALTER TABLE bug56632 KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SHOW CREATE TABLE bug56632;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 'bug56632';
|
||||
|
||||
--echo # Cleanup
|
||||
DROP TABLE IF EXISTS bug56632;
|
||||
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
|
||||
EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig;
|
||||
EVAL SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig;
|
||||
EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
|
||||
--enable_query_log
|
||||
|
@ -12,6 +12,7 @@ create table C(id int not null auto_increment primary key, f1 int not null, fore
|
||||
insert into A values(1), (2);
|
||||
|
||||
--disable_query_log
|
||||
begin;
|
||||
let $i=257;
|
||||
while ($i)
|
||||
{
|
||||
@ -24,6 +25,7 @@ while ($i)
|
||||
insert into C(f1) values(2);
|
||||
dec $i;
|
||||
}
|
||||
commit;
|
||||
--enable_query_log
|
||||
|
||||
# Following Deletes should not report error
|
||||
|
@ -27,3 +27,14 @@ select * from bug38999_1;
|
||||
select * from bug38999_2;
|
||||
|
||||
drop table bug38999_1,bug38999_2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb
|
||||
--echo #
|
||||
CREATE TABLE t1(f1 INT) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
--error ER_OPERAND_COLUMNS
|
||||
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@ -647,5 +647,48 @@ CREATE INDEX c on t1 (c);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#56862 Execution of a query that uses index merge returns a wrong result
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
a int,
|
||||
b int,
|
||||
INDEX idx(a))
|
||||
ENGINE=INNODB;
|
||||
|
||||
INSERT INTO t1(a,b) VALUES
|
||||
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
|
||||
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
|
||||
(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
|
||||
(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
|
||||
INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1(a,b) SELECT a,b FROM t1;
|
||||
INSERT INTO t1 VALUES (1000000, 0, 0);
|
||||
|
||||
SET SESSION sort_buffer_size = 1024*36;
|
||||
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM
|
||||
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
|
||||
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
|
||||
|
||||
SELECT COUNT(*) FROM
|
||||
(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
|
||||
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
|
||||
|
||||
SET SESSION sort_buffer_size = DEFAULT;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
Reference in New Issue
Block a user