1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.1 into 10.2

This commit is contained in:
Marko Mäkelä
2017-10-25 17:17:21 +03:00
36 changed files with 1264 additions and 303 deletions

View File

@ -37,10 +37,10 @@ test/t3 5 41 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
# Redundant: 8123, Compact: 8126.
@ -418,9 +418,10 @@ CREATE INDEX t1e ON t1 (e(767));
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
CREATE INDEX t1f ON t1 (f(767));
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
ERROR HY000: Undo log record is too big
ROLLBACK;
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
@ -453,8 +454,9 @@ UPDATE t1 SET r=@e;
CREATE INDEX t1s ON t1 (s(767));
UPDATE t1 SET s=@e;
CREATE INDEX t1t ON t1 (t(767));
BEGIN;
UPDATE t1 SET t=@e;
ERROR HY000: Undo log record is too big
ROLLBACK;
CREATE INDEX t1u ON t1 (u(767));
CREATE INDEX t1ut ON t1 (u(767), t(767));
CREATE INDEX t1st ON t1 (s(767), t(767));
@ -631,11 +633,11 @@ PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767))
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751));
COMMIT;
BEGIN;
UPDATE bug12547647 SET c = REPEAT('b',16928);
ERROR HY000: Undo log record is too big
SHOW WARNINGS;
Level Code Message
Error 1713 Undo log record is too big
ROLLBACK;
DROP TABLE bug12547647;
SET SESSION innodb_strict_mode = off;
CREATE TABLE t1(

View File

@ -41,10 +41,10 @@ test/t3 5 37 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
test/t3 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3.ibd
test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
# Redundant: 1979, Compact: 1982.
@ -285,9 +285,10 @@ CREATE INDEX t1a ON t1 (a(767));
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
CREATE INDEX t1b ON t1 (b(767));
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
ERROR HY000: Undo log record is too big
ROLLBACK;
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
@ -296,8 +297,9 @@ COMMIT;
CREATE INDEX t1c ON t1 (c(767));
UPDATE t1 SET c=@e;
CREATE INDEX t1d ON t1 (d(767));
BEGIN;
UPDATE t1 SET d=@e;
ERROR HY000: Undo log record is too big
ROLLBACK;
CREATE INDEX t1e ON t1 (e(767));
SHOW CREATE TABLE t1;
Table Create Table

View File

@ -41,10 +41,10 @@ test/t3 5 39 PRIMARY 3 3 1 50
test/t4 5 33 PRIMARY 3 3 1 50
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
test/t3 Single DEFAULT 4096 Compressed MYSQLD_DATADIR/test/t3.ibd
test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
# Redundant: 4027, Compact: 4030.
@ -297,9 +297,10 @@ CREATE INDEX t1b ON t1 (b(767));
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
CREATE INDEX t1c ON t1 (c(767));
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
ERROR HY000: Undo log record is too big
ROLLBACK;
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
@ -319,8 +320,9 @@ CREATE INDEX t1i ON t1 (i(767));
UPDATE t1 SET i=@e;
CREATE INDEX t1k ON t1 (j(767));
CREATE INDEX t1j ON t1 (j(500));
BEGIN;
UPDATE t1 SET j=@e;
ERROR HY000: Undo log record is too big
ROLLBACK;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (

View File

@ -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,23 +73,24 @@ 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 ###
@ -98,10 +101,11 @@ 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 767 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;
@ -122,14 +126,12 @@ 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 +141,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;
@ -162,10 +164,10 @@ 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 767 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 767 bytes
show create table worklog5743_4;
Table Create Table
worklog5743_4 CREATE TABLE `worklog5743_4` (
@ -175,16 +177,16 @@ worklog5743_4 CREATE TABLE `worklog5743_4` (
) 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 767 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 767 bytes
create index idx4 on worklog5743_4(a2(768));
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 767 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 767 bytes
create index idx5 on worklog5743_4(a1, a2(765));
ERROR 42000: Specified key was too long; max key length is 768 bytes
show warnings;
@ -234,24 +236,19 @@ 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 +258,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 +269,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 +281,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 +318,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 +343,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 +352,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 +366,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 +397,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;

View File

@ -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 ###
@ -99,18 +102,20 @@ 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 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 767 bytes
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 4030. 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: 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;
@ -131,14 +136,12 @@ 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
Note 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
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
@ -146,7 +149,7 @@ 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
@ -169,25 +172,25 @@ 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 767 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 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;
@ -201,25 +204,25 @@ 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
Note 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
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:
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;
@ -280,29 +283,22 @@ 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 +311,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 +324,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 +361,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 +395,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 +409,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 +433,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;