SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
FROM information_schema.tables WHERE engine='innodb';
Table Op Msg_type Msg_text
test.t1 analyze status OK
analyze table t2;
Table Op Msg_type Msg_text
test.t2 analyze status OK
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
FROM information_schema.tables WHERE engine='innodb';
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
Warnings:
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(
CREATE TABLE t1(
id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE=InnoDB;
) ENGINE=InnoDB;
...
@@ -3048,8 +3046,8 @@ SET TX_ISOLATION='read-committed';
...
@@ -3048,8 +3046,8 @@ SET TX_ISOLATION='read-committed';
CREATE TABLE bug53591(a text charset utf8 not null)
CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
ERROR HY000: Too big row
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
SHOW WARNINGS;
SHOW WARNINGS;
Level Code Message
Level Code Message
Error 139 Too big row
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
Error 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
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
create index idx1 on worklog5743_4(a1, a2(1964));
show warnings;
Level Code Message
Warning 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;
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
Warning 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;
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;
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
Warning 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;
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;
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
Warning 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;
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;
create index idx2 on worklog5743_8(a2(3073));
Warnings:
Warning 1071 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
create index idx3 on worklog5743_8(a2(3072));
show warnings;
Level Code Message
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;
create index idx1 on worklog5743_16(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;
create index idx2 on worklog5743_16(a2(3073));
Warnings:
Warning 1071 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
create index idx3 on worklog5743_16(a2(3072));
show warnings;
Level Code Message
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
insert into worklog5743_1 values(9, repeat("a", 10000));
insert into worklog5743_2 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_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;
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;
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;
begin;
update worklog5743_1 set a1 = 1000;
update worklog5743_2 set a1 = 1000;
update worklog5743_2 set a1 = 1000;
update worklog5743_4 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
select @@session.tx_isolation;
select @@session.tx_isolation;
@@session.tx_isolation
@@session.tx_isolation
REPEATABLE-READ
REPEATABLE-READ
explain select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9;
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
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE worklog5743_2 ref idx1 idx1 5 const 1
1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9;
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
a1 a2 = repeat("a", 10000)
id select_type table type possible_keys key key_len ref rows Extra
9 1
1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9;
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
a1 a2 = repeat("a", 10000)
id select_type table type possible_keys key key_len ref rows Extra
9 1
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
@@ -1172,7 +1200,6 @@ DROP INDEX prefix_idx ON worklog5743;
...
@@ -1172,7 +1200,6 @@ DROP INDEX prefix_idx ON worklog5743;
CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000));
CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000));
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
Warning 1071 Specified key was too long; max key length is 3072 bytes
Warning 1071 Specified key was too long; max key length is 3072 bytes
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
col_1_varbinary = REPEAT("a", 4000)
col_1_varbinary = REPEAT("a", 4000)
...
@@ -1230,7 +1257,6 @@ DROP INDEX prefix_idx ON worklog5743;
...
@@ -1230,7 +1257,6 @@ DROP INDEX prefix_idx ON worklog5743;
CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000));
CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000));
Warnings:
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
Warning 1071 Specified key was too long; max key length is 3072 bytes
Warning 1071 Specified key was too long; max key length is 3072 bytes
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
col_1_text = REPEAT("a", 4000)
col_1_text = REPEAT("a", 4000)
...
@@ -1288,7 +1314,7 @@ AND col_2_text = REPEAT("o", 4000);
...
@@ -1288,7 +1314,7 @@ AND col_2_text = REPEAT("o", 4000);
col_1_text = REPEAT("c", 4000)
col_1_text = REPEAT("c", 4000)
ALTER TABLE worklog5743 DROP PRIMARY KEY;
ALTER TABLE worklog5743 DROP PRIMARY KEY;
ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950));
ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950));
ERROR HY000: Too big row
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
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;