mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Remove deprecated InnoDB file format parameters
The following options will be removed: innodb_file_format innodb_file_format_check innodb_file_format_max innodb_large_prefix They have been deprecated in MySQL 5.7.7 (and MariaDB 10.2.2) in WL#7703. The file_format column in two INFORMATION_SCHEMA tables will be removed: innodb_sys_tablespaces innodb_sys_tables Code to update the file format tag at the end of page 0:5 (TRX_SYS_PAGE in the InnoDB system tablespace) will be removed. When initializing a new database, the bytes will remain 0. All references to the Barracuda file format will be removed. Some references to the Antelope file format (meaning ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT) will remain. This basically ports WL#7704 from MySQL 8.0.0 to MariaDB 10.3.1: commit 4a69dc2a95995501ed92d59a1de74414a38540c6 Author: Marko Mäkelä <marko.makela@oracle.com> Date: Wed Mar 11 22:19:49 2015 +0200
This commit is contained in:
@ -282,26 +282,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_file_format = `Antelope`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
Got one of the listed errors
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
Got one of the listed errors
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 7) This series of tests were moved from innodb-index to here
|
||||
# because the second alter table t1 assumes a 16k page size.
|
||||
# Moving the test allows the rest of innodb-index to be run on all
|
||||
|
@ -245,28 +245,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_file_format = `Antelope`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 7) Not included here; 16k only
|
||||
# Test 8) Test creating a table that could lead to undo log overflow.
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
|
@ -257,27 +257,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_file_format = `Antelope`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 7) Not included here; 16k only
|
||||
# Test 8) Test creating a table that could lead to undo log overflow.
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
|
@ -1,7 +1,4 @@
|
||||
SET default_storage_engine=InnoDB;
|
||||
SET GLOBAL innodb_file_format=`Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET SESSION innodb_strict_mode = ON;
|
||||
# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
|
||||
@ -260,76 +257,10 @@ Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 1
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
|
||||
# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
|
||||
# and that they can be set to default values during strict mode.
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
|
||||
Got one of the listed errors
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
|
||||
Got one of the listed errors
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Redundant row_format=REDUNDANT
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Compact row_format=COMPACT
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
DROP TABLE t1;
|
||||
# and a valid non-zero KEY_BLOCK_SIZE
|
||||
# can be set to default values during strict mode.
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -344,9 +275,6 @@ Level Code Message
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED
|
||||
# and a valid non-zero KEY_BLOCK_SIZE are rejected with
|
||||
# innodb_file_per_table=OFF and that they can be set to default
|
||||
@ -744,9 +672,7 @@ Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic key_block_size=15
|
||||
# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
|
||||
valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
|
||||
is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
|
||||
# Test 15) StrictMode=OFF.
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
@ -754,27 +680,12 @@ Level Code Message
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Compressed row_format=COMPRESSED key_block_size=1
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=COMPRESSED key_block_size=1
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
t1 Compressed row_format=COMPRESSED key_block_size=1
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@ -788,18 +699,12 @@ Level Code Message
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=DYNAMIC
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=DYNAMIC
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@ -853,5 +758,3 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=DYNAMIC
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -94,18 +94,6 @@ create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
||||
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
Got one of the listed errors
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
Got one of the listed errors
|
||||
show warnings;
|
||||
@ -128,19 +116,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
||||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET sql_mode= '';
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
@ -163,18 +138,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
||||
create index idx6 on worklog5743_2(a1, a2(940));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_4(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
@ -197,18 +160,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
||||
create index idx6 on worklog5743_4(a1, a2(1964));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
@ -237,18 +188,6 @@ Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_16(a2(1000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_16(a2(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
@ -283,37 +222,21 @@ insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
begin;
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
@ -323,23 +246,18 @@ update worklog5743_16 set a1 = 1000;
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
|
@ -7,26 +7,26 @@ Level Code Message
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
update worklog5743 set a = (repeat("b", 16000));
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx on worklog5743(a(900));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
SET sql_mode= default;
|
||||
begin;
|
||||
update worklog5743 set a = (repeat("x", 17000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connect con1,localhost,root,,;
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
0
|
||||
select a = repeat("b", 16000) from worklog5743;
|
||||
a = repeat("b", 16000)
|
||||
1
|
||||
connect con2,localhost,root,,;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
@ -34,6 +34,7 @@ READ-UNCOMMITTED
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 2 ###
|
||||
@ -46,23 +47,24 @@ Level Code Message
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1111;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 3 ###
|
||||
@ -71,37 +73,36 @@ create index idx on worklog5743(a1, a2(50));
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 2222;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 4 ###
|
||||
create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
|
||||
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_1(a2(436));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
@ -118,18 +119,13 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
||||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show create table worklog5743_2;
|
||||
Table Create Table
|
||||
worklog5743_2 CREATE TABLE `worklog5743_2` (
|
||||
@ -139,16 +135,16 @@ worklog5743_2 CREATE TABLE `worklog5743_2` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
|
||||
create index idx3 on worklog5743_2(a2(769));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
create index idx4 on worklog5743_2(a2(768));
|
||||
Warnings:
|
||||
Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_2'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_2'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
create index idx5 on worklog5743_2(a1, a2(765));
|
||||
ERROR 42000: Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
@ -157,34 +153,31 @@ Error 1071 Specified key was too long; max key length is 768 bytes
|
||||
create index idx6 on worklog5743_2(a1, a2(764));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show create table worklog5743_4;
|
||||
Table Create Table
|
||||
worklog5743_4 CREATE TABLE `worklog5743_4` (
|
||||
`a1` int(11) DEFAULT NULL,
|
||||
`a2` text NOT NULL,
|
||||
KEY `idx1` (`a2`(767))
|
||||
KEY `idx1` (`a2`(768))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
|
||||
create index idx3 on worklog5743_4(a2(769));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
create index idx4 on worklog5743_4(a2(768));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
create index idx5 on worklog5743_4(a1, a2(765));
|
||||
ERROR 42000: Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
@ -197,27 +190,15 @@ SET sql_mode= default;
|
||||
insert into worklog5743_1 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
begin;
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
@ -225,33 +206,25 @@ update worklog5743_4 set a1 = 1000;
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_1`.`a1` AS `a1`,left(`test`.`worklog5743_1`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_1` where (`test`.`worklog5743_1`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_2`.`a1` AS `a1`,left(`test`.`worklog5743_2`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_2` where (`test`.`worklog5743_2`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_4`.`a1` AS `a1`,left(`test`.`worklog5743_4`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_4` where (`test`.`worklog5743_4`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
@ -261,6 +234,7 @@ a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
@ -271,6 +245,7 @@ select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743_1;
|
||||
drop table worklog5743_2;
|
||||
@ -282,6 +257,7 @@ ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1071 Specified key was too long; max key length is 768 bytes
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a1 int, a2 varchar(3072)) ROW_FORMAT=DYNAMIC;
|
||||
create index idx1 on worklog5743(a2);
|
||||
@ -318,23 +294,24 @@ Level Code Message
|
||||
insert into worklog5743 values(9, repeat("a", 764));
|
||||
begin;
|
||||
update worklog5743 set a1 = 4444;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1 from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx1 idx1 5 const 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx1 idx1 5 const 1 Using index
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
9
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 6 ###
|
||||
@ -342,7 +319,7 @@ create table worklog5743(a TEXT not null, primary key (a(1000)));
|
||||
ERROR 42000: Specified key was too long; max key length is 768 bytes
|
||||
create table worklog5743(a TEXT) ROW_FORMAT=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx on worklog5743(a(767));
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
begin;
|
||||
@ -351,9 +328,12 @@ update worklog5743 set a = (repeat("x", 25000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connection con1;
|
||||
select a = repeat("a", 20000) from worklog5743;
|
||||
a = repeat("a", 20000)
|
||||
1
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
@ -362,26 +342,26 @@ select a = repeat("x", 25000) from worklog5743;
|
||||
a = repeat("x", 25000)
|
||||
1
|
||||
1
|
||||
disconnect con2;
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 7 ###
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx1 on worklog5743(a(769));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
SET sql_mode= default;
|
||||
create index idx2 on worklog5743(a(768));
|
||||
Warnings:
|
||||
Warning 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
|
||||
show create table worklog5743;
|
||||
Table Create Table
|
||||
worklog5743 CREATE TABLE `worklog5743` (
|
||||
@ -393,12 +373,12 @@ insert into worklog5743 values(repeat("a", 768));
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
SET GLOBAL innodb_file_per_table=1;
|
||||
|
@ -7,26 +7,26 @@ Level Code Message
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
update worklog5743 set a = (repeat("b", 16000));
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx on worklog5743(a(2000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
SET sql_mode= default;
|
||||
begin;
|
||||
update worklog5743 set a = (repeat("x", 17000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connect con1,localhost,root,,;
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
0
|
||||
select a = repeat("b", 16000) from worklog5743;
|
||||
a = repeat("b", 16000)
|
||||
1
|
||||
connect con2,localhost,root,,;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
@ -34,6 +34,7 @@ READ-UNCOMMITTED
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 2 ###
|
||||
@ -46,23 +47,24 @@ Level Code Message
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 3 ###
|
||||
@ -71,23 +73,24 @@ create index idx on worklog5743(a1, a2(50));
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 4 ###
|
||||
@ -95,22 +98,12 @@ create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
|
||||
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Specified key was too long; max key length is 1536 bytes
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_1(a2(436));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
@ -127,26 +120,11 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
||||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_2(a2(948));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
@ -164,30 +142,18 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
||||
create index idx6 on worklog5743_2(a1, a2(940));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx3 on worklog5743_4(a2(1537));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx4 on worklog5743_4(a2(1536));
|
||||
Warnings:
|
||||
Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_4'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_4'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
create index idx5 on worklog5743_4(a1, a2(1533));
|
||||
ERROR 42000: Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
@ -196,30 +162,18 @@ Error 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx6 on worklog5743_4(a1, a2(1532));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx3 on worklog5743_8(a2(3072));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx4 on worklog5743_8(a1, a2(1533));
|
||||
ERROR 42000: Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
@ -233,32 +187,18 @@ insert into worklog5743_1 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
begin;
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
@ -267,42 +207,31 @@ update worklog5743_8 set a1 = 1000;
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_1`.`a1` AS `a1`,left(`test`.`worklog5743_1`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_1` where (`test`.`worklog5743_1`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_2`.`a1` AS `a1`,left(`test`.`worklog5743_2`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_2` where (`test`.`worklog5743_2`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_4`.`a1` AS `a1`,left(`test`.`worklog5743_4`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_4` where (`test`.`worklog5743_4`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_8 NULL ref idx5 idx5 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_8`.`a1` AS `a1`,left(`test`.`worklog5743_8`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_8` where (`test`.`worklog5743_8`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_8 ref idx5 idx5 5 const 1
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
@ -315,6 +244,7 @@ a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
@ -327,6 +257,7 @@ select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743_1;
|
||||
drop table worklog5743_2;
|
||||
@ -363,31 +294,32 @@ insert into worklog5743 values(9, repeat("a", 1532));
|
||||
update worklog5743 set a1 = 1000;
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1 from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx1 idx1 5 const 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx1 idx1 5 const 1 Using index
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 6 ###
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000)))
|
||||
row_format=compact;
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create table worklog5743(a TEXT) row_format=compact;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx on worklog5743(a(767));
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
begin;
|
||||
@ -396,9 +328,12 @@ update worklog5743 set a = (repeat("x", 25000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connection con1;
|
||||
select a = repeat("a", 20000) from worklog5743;
|
||||
a = repeat("a", 20000)
|
||||
1
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
@ -407,19 +342,19 @@ select a = repeat("x", 25000) from worklog5743;
|
||||
a = repeat("x", 25000)
|
||||
1
|
||||
1
|
||||
disconnect con2;
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 7 ###
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx1 on worklog5743(a(3073));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx2 on worklog5743(a(3072));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
SET sql_mode= default;
|
||||
show create table worklog5743;
|
||||
Table Create Table
|
||||
@ -431,12 +366,12 @@ worklog5743 CREATE TABLE `worklog5743` (
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
SET GLOBAL innodb_file_per_table=1;
|
||||
|
@ -7,9 +7,6 @@ table_name row_format data_length index_length
|
||||
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
|
||||
set session innodb_strict_mode=0;
|
||||
set global innodb_file_per_table=off;
|
||||
set global innodb_file_format=`0`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET @@global.innodb_stats_on_metadata=ON;
|
||||
create table t0(a int primary key) engine=innodb row_format=compressed;
|
||||
Warnings:
|
||||
@ -19,7 +16,6 @@ create table t00(a int primary key) engine=innodb
|
||||
key_block_size=4 row_format=compressed;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
|
||||
@ -29,23 +25,17 @@ create table t3(a int primary key) engine=innodb row_format=compact;
|
||||
create table t4(a int primary key) engine=innodb key_block_size=9;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
|
||||
create table t5(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
set global innodb_file_per_table=on;
|
||||
create table t6(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
set global innodb_file_format=`1`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
create table t7(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
Warnings:
|
||||
@ -159,40 +149,7 @@ count(*)
|
||||
1
|
||||
update t1 set c3 = repeat('E', 20000) where c1 = 1;
|
||||
drop table t1;
|
||||
set global innodb_file_format=`0`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Antelope
|
||||
set global innodb_file_format=`1`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
set global innodb_file_format=`2`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '2'
|
||||
set global innodb_file_format=`-1`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '-1'
|
||||
set global innodb_file_format=`Antelope`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format=`Cheetah`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Cheetah'
|
||||
set global innodb_file_format=`abc`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'abc'
|
||||
set global innodb_file_format=`1a`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '1a'
|
||||
set global innodb_file_format=``;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of ''
|
||||
set global innodb_file_per_table = on;
|
||||
set global innodb_file_format = `1`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set innodb_strict_mode = off;
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 0;
|
||||
drop table t1;
|
||||
@ -325,84 +282,4 @@ mysqltest_innodb_zip t7 Dynamic {valid} 0
|
||||
mysqltest_innodb_zip t8 Compact {valid} 0
|
||||
mysqltest_innodb_zip t9 Redundant {valid} 0
|
||||
drop table t7, t8, t9;
|
||||
set global innodb_file_per_table = on;
|
||||
set global innodb_file_format = `0`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 1;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t2 (id int primary key) engine = innodb key_block_size = 2;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t3 (id int primary key) engine = innodb key_block_size = 4;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t6 (id int primary key) engine = innodb row_format = compressed;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t7 (id int primary key) engine = innodb row_format = dynamic;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t8 (id int primary key) engine = innodb row_format = compact;
|
||||
create table t9 (id int primary key) engine = innodb row_format = redundant;
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
|
||||
table_schema table_name row_format data_length index_length
|
||||
mysqltest_innodb_zip t8 Compact {valid} 0
|
||||
mysqltest_innodb_zip t9 Redundant {valid} 0
|
||||
drop table t8, t9;
|
||||
set global innodb_file_per_table=1;
|
||||
set global innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table normal_table (
|
||||
c1 int
|
||||
) engine = innodb;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
create table zip_table (
|
||||
c1 int
|
||||
) engine = innodb key_block_size = 4;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
show table status;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
drop table normal_table, zip_table;
|
||||
DROP DATABASE mysqltest_innodb_zip;
|
||||
|
@ -1,7 +1,4 @@
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`1`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table t1(a text) engine=innodb key_block_size=8;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
@ -14,5 +11,3 @@ create table t2(a text) engine=innodb;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
drop table t2;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,538 +0,0 @@
|
||||
SET default_storage_engine=InnoDB;
|
||||
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_strict_mode=1;
|
||||
### Test 1 ###
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
update worklog5743 set a = (repeat("b", 16000));
|
||||
create index idx on worklog5743(a(2000));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
begin;
|
||||
update worklog5743 set a = (repeat("x", 17000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connect con1,localhost,root,,;
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
0
|
||||
select a = repeat("b", 16000) from worklog5743;
|
||||
a = repeat("b", 16000)
|
||||
1
|
||||
connect con2,localhost,root,,;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 2 ###
|
||||
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx on worklog5743(a1, a2(2000));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 3 ###
|
||||
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
create index idx on worklog5743(a1, a2(50));
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 4 ###
|
||||
create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
|
||||
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
||||
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
|
||||
set sql_mode='';
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_1(a2(436));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx4 on worklog5743_1(a2(434));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx5 on worklog5743_1(a1, a2(430));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_2(a2(948));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx4 on worklog5743_2(a2(946));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx5 on worklog5743_2(a1, a2(942));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx6 on worklog5743_2(a1, a2(940));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_4(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_4(a2(1972));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx4 on worklog5743_4(a2(1970));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx5 on worklog5743_4(a1, a2(1966));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx6 on worklog5743_4(a1, a2(1964));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx3 on worklog5743_8(a2(3072));
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
|
||||
create index idx4 on worklog5743_8(a1, a2(3069));
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx5 on worklog5743_8(a1, a2(3068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx6 on worklog5743_8(a1, a2(2000), a3(1069));
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_16(a2(1000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_16(a2(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx3 on worklog5743_16(a2(3072));
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
|
||||
create index idx4 on worklog5743_16(a1, a2(3069));
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx5 on worklog5743_16(a1, a2(3068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set sql_mode=default;
|
||||
insert into worklog5743_1 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
begin;
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
update worklog5743_4 set a1 = 1000;
|
||||
update worklog5743_8 set a1 = 1000;
|
||||
update worklog5743_16 set a1 = 1000;
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_8 ref idx5,idx7 idx5 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_16 ref idx5,idx7 idx5 5 const 1
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743_1;
|
||||
drop table worklog5743_2;
|
||||
drop table worklog5743_4;
|
||||
drop table worklog5743_8;
|
||||
drop table worklog5743_16;
|
||||
### Test 5 ###
|
||||
create table worklog5743(a1 int,
|
||||
a2 varchar(20000),
|
||||
a3 varchar(3073),
|
||||
a4 varchar(3072),
|
||||
a5 varchar(3069),
|
||||
a6 varchar(3068))
|
||||
ROW_FORMAT=DYNAMIC;
|
||||
set sql_mode='';
|
||||
create index idx1 on worklog5743(a2);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx2 on worklog5743(a3);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx3 on worklog5743(a4);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx4 on worklog5743(a1, a2);
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx5 on worklog5743(a1, a5);
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx6 on worklog5743(a1, a6);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
show create table worklog5743;
|
||||
Table Create Table
|
||||
worklog5743 CREATE TABLE `worklog5743` (
|
||||
`a1` int(11) DEFAULT NULL,
|
||||
`a2` varchar(20000) DEFAULT NULL,
|
||||
`a3` varchar(3073) DEFAULT NULL,
|
||||
`a4` varchar(3072) DEFAULT NULL,
|
||||
`a5` varchar(3069) DEFAULT NULL,
|
||||
`a6` varchar(3068) DEFAULT NULL,
|
||||
KEY `idx1` (`a2`(3072)),
|
||||
KEY `idx2` (`a3`(3072)),
|
||||
KEY `idx3` (`a4`),
|
||||
KEY `idx6` (`a1`,`a6`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
set sql_mode=default;
|
||||
insert into worklog5743 values(9,
|
||||
repeat("a", 20000), repeat("a", 3073),
|
||||
repeat("a", 3072), repeat("a", 3069),
|
||||
repeat("a", 3068));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1 from worklog5743 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx6 idx6 5 const 1 Using index
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
9
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 6 ###
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000))) row_format=COMPACT;
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create table worklog5743(a TEXT) row_format=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx on worklog5743(a(767));
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
begin;
|
||||
insert into worklog5743 values(repeat("b", 20000));
|
||||
update worklog5743 set a = (repeat("x", 25000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connection con1;
|
||||
select a = repeat("a", 20000) from worklog5743;
|
||||
a = repeat("a", 20000)
|
||||
1
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a = repeat("x", 25000) from worklog5743;
|
||||
a = repeat("x", 25000)
|
||||
1
|
||||
1
|
||||
disconnect con2;
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 7 ###
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
set statement sql_mode = '' for
|
||||
create index idx1 on worklog5743(a(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx2 on worklog5743(a(3072));
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
|
||||
show create table worklog5743;
|
||||
Table Create Table
|
||||
worklog5743 CREATE TABLE `worklog5743` (
|
||||
`a` text NOT NULL,
|
||||
KEY `idx1` (`a`(3072)),
|
||||
KEY `idx2` (`a`(3072))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
SET GLOBAL innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_strict_mode = DEFAULT;
|
@ -109,9 +109,6 @@ drop table t2;
|
||||
drop table t3;
|
||||
drop procedure populate;
|
||||
drop procedure populate_small;
|
||||
set global innodb_file_format = Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_per_table = 1;
|
||||
set innodb_strict_mode=OFF;
|
||||
create procedure populate()
|
||||
@ -222,9 +219,6 @@ drop table t2;
|
||||
drop table t3;
|
||||
drop procedure populate;
|
||||
drop procedure populate_small;
|
||||
set global innodb_file_format = Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_per_table = 1;
|
||||
set innodb_strict_mode=OFF;
|
||||
create procedure populate()
|
||||
@ -339,7 +333,4 @@ drop table t2;
|
||||
drop table t3;
|
||||
drop procedure populate;
|
||||
drop procedure populate_small;
|
||||
set global innodb_file_format = Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_per_table = 1;
|
||||
|
Reference in New Issue
Block a user