2
# Bug#36169 create innodb compressed table with too large row size crashed
3
# http://bugs.mysql.com/36169
6
-- source include/have_innodb.inc
7
-- source suite/innodb/include/have_innodb_plugin.inc
9
SET GLOBAL innodb_file_format='Barracuda';
10
SET GLOBAL innodb_file_per_table=ON;
13
# The following is copied from http://bugs.mysql.com/36169
14
# (http://bugs.mysql.com/file.php?id=9121)
15
# Probably it can be simplified but that is not obvious.
18
# we care only that the following SQL commands do produce errors
19
# as expected and do not crash the server
23
# Generating 10 tables
24
# Creating a table with 94 columns and 24 indexes
25
DROP TABLE IF EXISTS `table0`;
26
--error ER_TOO_BIG_ROWSIZE
27
CREATE TABLE IF NOT EXISTS `table0`
33
`col5` SET ('test1','test2','test3'),
37
`col9` SET ('test1','test2','test3'),
39
`col11` DOUBLE PRECISION,
40
`col12` ENUM ('test1','test2','test3'),
43
`col15` SET ('test1','test2','test3'),
48
`col20` DOUBLE PRECISION,
57
`col29` ENUM ('test1','test2','test3'),
85
`col57` ENUM ('test1','test2','test3'),
88
`col60` VARCHAR (232),
97
`col69` ENUM ('test1','test2','test3'),
102
`col74` VARCHAR (170),
103
`col75` SET ('test1','test2','test3'),
116
`col88` VARCHAR (145),
122
KEY `idx0` (`col69`,`col90`,`col8`),
123
KEY `idx1` (`col60`),
124
KEY `idx2` (`col60`,`col70`,`col74`),
125
KEY `idx3` (`col22`,`col32`,`col72`,`col30`),
126
KEY `idx4` (`col29`),
127
KEY `idx5` (`col19`,`col45`(143)),
128
KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)),
129
KEY `idx7` (`col48`,`col61`),
130
KEY `idx8` (`col93`),
131
KEY `idx9` (`col31`),
132
KEY `idx10` (`col30`,`col21`),
133
KEY `idx11` (`col67`),
134
KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)),
135
KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)),
136
KEY `idx14` (`col78`),
137
KEY `idx15` (`col63`,`col67`,`col64`),
138
KEY `idx16` (`col17`,`col86`),
139
KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)),
140
KEY `idx18` (`col62`),
141
KEY `idx19` (`col31`,`col57`,`col56`,`col53`),
142
KEY `idx20` (`col46`),
143
KEY `idx21` (`col83`(54)),
144
KEY `idx22` (`col51`,`col7`(120)),
145
KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`)
146
)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
148
# Creating a table with 10 columns and 32 indexes
149
DROP TABLE IF EXISTS `table1`;
150
--error ER_TOO_BIG_ROWSIZE
151
CREATE TABLE IF NOT EXISTS `table1`
158
`col6` SET ('test1','test2','test3'),
162
KEY `idx0` (`col5`(101),`col7`,`col8`),
164
KEY `idx2` (`col4`(177),`col9`(126),`col6`,`col3`),
165
KEY `idx3` (`col5`(160)),
166
KEY `idx4` (`col9`(242)),
167
KEY `idx5` (`col4`(139),`col2`,`col3`),
169
KEY `idx7` (`col6`,`col2`,`col0`,`col3`),
170
KEY `idx8` (`col9`(66)),
171
KEY `idx9` (`col5`(253)),
172
KEY `idx10` (`col1`,`col7`,`col2`),
173
KEY `idx11` (`col9`(242),`col0`,`col8`,`col5`(163)),
174
KEY `idx12` (`col8`),
175
KEY `idx13` (`col0`,`col9`(37)),
176
KEY `idx14` (`col0`),
177
KEY `idx15` (`col5`(111)),
178
KEY `idx16` (`col8`,`col0`,`col5`(13)),
179
KEY `idx17` (`col4`(139)),
180
KEY `idx18` (`col5`(189),`col2`,`col3`,`col9`(136)),
181
KEY `idx19` (`col0`,`col3`,`col1`,`col8`),
182
KEY `idx20` (`col8`),
183
KEY `idx21` (`col0`,`col7`,`col9`(227),`col3`),
184
KEY `idx22` (`col0`),
185
KEY `idx23` (`col2`),
186
KEY `idx24` (`col3`),
187
KEY `idx25` (`col2`,`col3`),
188
KEY `idx26` (`col0`),
189
KEY `idx27` (`col5`(254)),
190
KEY `idx28` (`col3`),
191
KEY `idx29` (`col3`),
192
KEY `idx30` (`col7`,`col3`,`col0`,`col4`(220)),
193
KEY `idx31` (`col4`(1),`col0`)
194
)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
196
# Creating a table with 141 columns and 18 indexes
197
DROP TABLE IF EXISTS `table2`;
198
--error ER_TOO_BIG_ROWSIZE
199
CREATE TABLE IF NOT EXISTS `table2`
202
`col2` VARCHAR (209),
221
`col21` SET ('test1','test2','test3'),
225
`col25` ENUM ('test1','test2','test3'),
227
`col27` VARCHAR (116),
231
`col31` DOUBLE PRECISION,
238
`col38` VARCHAR (253),
247
`col47` DOUBLE PRECISION,
248
`col48` SET ('test1','test2','test3'),
249
`col49` DOUBLE PRECISION,
250
`col50` VARCHAR (97),
253
`col53` ENUM ('test1','test2','test3'),
266
`col66` VARCHAR (212),
273
`col73` ENUM ('test1','test2','test3'),
282
`col82` SET ('test1','test2','test3'),
283
`col83` DOUBLE PRECISION,
285
`col85` VARCHAR (184),
286
`col86` DOUBLE PRECISION,
292
`col92` ENUM ('test1','test2','test3'),
301
`col101` DOUBLE PRECISION,
310
`col110` SET ('test1','test2','test3'),
319
`col119` SET ('test1','test2','test3'),
326
`col126` ENUM ('test1','test2','test3'),
328
`col128` DOUBLE PRECISION,
330
`col130` VARCHAR (159),
334
`col134` SET ('test1','test2','test3'),
336
`col136` SET ('test1','test2','test3'),
341
KEY `idx0` (`col14`(139),`col24`(208),`col38`,`col35`),
342
KEY `idx1` (`col48`,`col118`,`col29`(131),`col100`),
343
KEY `idx2` (`col86`,`col67`,`col43`(175)),
344
KEY `idx3` (`col19`),
345
KEY `idx4` (`col40`(220),`col67`),
346
KEY `idx5` (`col99`,`col56`),
347
KEY `idx6` (`col68`,`col28`,`col137`(157)),
348
KEY `idx7` (`col51`(160),`col99`,`col45`,`col39`(9)),
349
KEY `idx8` (`col15`,`col52`,`col90`,`col94`),
350
KEY `idx9` (`col24`(3),`col139`(248),`col108`(118),`col41`),
351
KEY `idx10` (`col36`,`col92`,`col114`),
352
KEY `idx11` (`col115`,`col9`(116)),
353
KEY `idx12` (`col130`,`col93`,`col134`),
354
KEY `idx13` (`col123`(65)),
355
KEY `idx14` (`col44`(90),`col86`,`col119`),
356
KEY `idx15` (`col69`),
357
KEY `idx16` (`col132`,`col81`(118),`col18`),
358
KEY `idx17` (`col24`(250),`col7`,`col92`,`col45`)
359
)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
361
# Creating a table with 199 columns and 1 indexes
362
DROP TABLE IF EXISTS `table3`;
363
--error ER_TOO_BIG_ROWSIZE
364
CREATE TABLE IF NOT EXISTS `table3`
366
`col1` SET ('test1','test2','test3'),
393
`col28` VARCHAR (106),
411
`col46` DOUBLE PRECISION,
414
`col49` DOUBLE PRECISION,
422
`col57` ENUM ('test1','test2','test3'),
431
`col66` VARCHAR (88),
463
`col98` ENUM ('test1','test2','test3'),
468
`col103` SET ('test1','test2','test3'),
475
`col110` VARCHAR (131),
481
`col116` SET ('test1','test2','test3'),
482
`col117` ENUM ('test1','test2','test3'),
485
`col120` SET ('test1','test2','test3'),
488
`col123` VARCHAR (242),
499
`col134` DOUBLE PRECISION,
501
`col136` SET ('test1','test2','test3'),
503
`col138` DOUBLE PRECISION,
506
`col141` SET ('test1','test2','test3'),
508
`col143` VARCHAR (26),
511
`col146` SET ('test1','test2','test3'),
528
`col163` VARCHAR (90),
531
`col166` ENUM ('test1','test2','test3'),
532
`col167` DOUBLE PRECISION,
533
`col168` DOUBLE PRECISION,
540
`col175` VARCHAR (14),
541
`col176` VARCHAR (90),
548
`col183` DOUBLE PRECISION,
564
KEY `idx0` (`col39`,`col23`)
565
)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
567
# Creating a table with 133 columns and 16 indexes
568
DROP TABLE IF EXISTS `table4`;
569
--error ER_TOO_BIG_ROWSIZE
570
CREATE TABLE IF NOT EXISTS `table4`
571
(`col0` VARCHAR (60),
584
`col13` VARCHAR (213),
591
`col20` SET ('test1','test2','test3'),
595
`col24` ENUM ('test1','test2','test3'),
602
`col31` SET ('test1','test2','test3'),
606
`col35` VARCHAR (146),
610
`col39` SET ('test1','test2','test3'),
624
`col53` SET ('test1','test2','test3'),
636
`col65` ENUM ('test1','test2','test3'),
637
`col66` DOUBLE PRECISION,
647
`col76` VARCHAR (122),
654
`col83` DOUBLE PRECISION,
659
`col88` DOUBLE PRECISION,
665
`col94` SET ('test1','test2','test3'),
667
`col96` SET ('test1','test2','test3'),
673
`col102` VARCHAR (225),
684
`col113` ENUM ('test1','test2','test3'),
690
`col119` DOUBLE PRECISION,
704
KEY `idx0` (`col130`),
705
KEY `idx1` (`col30`,`col55`,`col19`(31)),
706
KEY `idx2` (`col104`(186)),
707
KEY `idx3` (`col131`),
708
KEY `idx4` (`col64`,`col93`,`col2`(11)),
709
KEY `idx5` (`col34`,`col121`,`col22`),
710
KEY `idx6` (`col33`,`col55`,`col83`),
711
KEY `idx7` (`col17`,`col87`(245),`col99`(17)),
712
KEY `idx8` (`col65`,`col120`),
713
KEY `idx9` (`col82`),
714
KEY `idx10` (`col9`(72)),
715
KEY `idx11` (`col88`),
716
KEY `idx12` (`col128`,`col9`(200),`col71`,`col66`),
717
KEY `idx13` (`col77`(126)),
718
KEY `idx14` (`col105`(26),`col13`,`col117`),
719
KEY `idx15` (`col4`(246),`col130`,`col115`,`col3`(141))
720
)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
722
# Creating a table with 176 columns and 13 indexes
723
DROP TABLE IF EXISTS `table5`;
724
--error ER_TOO_BIG_ROWSIZE
725
CREATE TABLE IF NOT EXISTS `table5`
737
`col11` SET ('test1','test2','test3'),
744
`col18` SET ('test1','test2','test3'),
751
`col25` DOUBLE PRECISION,
766
`col40` SET ('test1','test2','test3'),
771
`col45` VARCHAR (126),
773
`col47` DOUBLE PRECISION,
779
`col53` VARCHAR (208),
780
`col54` VARCHAR (207),
783
`col57` ENUM ('test1','test2','test3'),
786
`col60` VARCHAR (73),
795
`col69` VARCHAR (58),
800
`col74` DOUBLE PRECISION,
809
`col83` ENUM ('test1','test2','test3'),
811
`col85` SET ('test1','test2','test3'),
815
`col89` ENUM ('test1','test2','test3'),
824
`col98` VARCHAR (198),
841
`col115` VARCHAR (7),
859
`col133` VARCHAR (123),
861
`col135` VARCHAR (225),
870
`col144` VARCHAR (236),
878
`col152` VARCHAR (72),
880
`col154` VARCHAR (165),
883
`col157` DOUBLE PRECISION,
888
`col162` DOUBLE PRECISION,
890
`col164` ENUM ('test1','test2','test3'),
898
`col172` VARCHAR (30),
902
KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`),
903
KEY `idx1` (`col24`,`col0`(108)),
904
KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`),
905
KEY `idx3` (`col2`(86)),
906
KEY `idx4` (`col2`(43)),
907
KEY `idx5` (`col83`,`col35`(87),`col111`),
908
KEY `idx6` (`col6`,`col134`,`col92`),
909
KEY `idx7` (`col56`),
910
KEY `idx8` (`col30`,`col53`,`col129`(66)),
911
KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)),
912
KEY `idx10` (`col34`),
913
KEY `idx11` (`col126`),
914
KEY `idx12` (`col24`)
915
)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
917
# Creating a table with 179 columns and 46 indexes
918
DROP TABLE IF EXISTS `table6`;
919
-- error ER_TOO_BIG_ROWSIZE
920
--error ER_TOO_BIG_ROWSIZE
921
CREATE TABLE IF NOT EXISTS `table6`
922
(`col0` ENUM ('test1','test2','test3'),
946
`col24` SET ('test1','test2','test3'),
970
`col48` ENUM ('test1','test2','test3'),
974
`col52` DOUBLE PRECISION,
975
`col53` ENUM ('test1','test2','test3'),
977
`col55` DOUBLE PRECISION,
983
`col61` ENUM ('test1','test2','test3'),
1003
`col81` ENUM ('test1','test2','test3'),
1004
`col82` VARCHAR (221),
1022
`col100` SET ('test1','test2','test3'),
1025
`col103` MEDIUMBLOB,
1026
`col104` MEDIUMTEXT,
1029
`col107` VARCHAR (26),
1039
`col117` SET ('test1','test2','test3'),
1050
`col128` MEDIUMBLOB,
1053
`col131` MEDIUMBLOB,
1062
`col140` SET ('test1','test2','test3'),
1063
`col141` ENUM ('test1','test2','test3'),
1064
`col142` ENUM ('test1','test2','test3'),
1068
`col146` DOUBLE PRECISION,
1070
`col148` MEDIUMTEXT,
1072
`col150` SET ('test1','test2','test3'),
1073
`col151` MEDIUMTEXT,
1074
`col152` CHAR (126),
1076
`col154` CHAR (243),
1077
`col155` SET ('test1','test2','test3'),
1078
`col156` SET ('test1','test2','test3'),
1089
`col167` VARCHAR (63),
1093
`col171` ENUM ('test1','test2','test3'),
1098
`col176` MEDIUMBLOB,
1101
KEY `idx0` (`col131`(219)),
1102
KEY `idx1` (`col67`,`col122`,`col59`,`col87`(33)),
1103
KEY `idx2` (`col83`,`col42`,`col57`(152)),
1104
KEY `idx3` (`col106`(124)),
1105
KEY `idx4` (`col173`,`col80`,`col165`,`col89`(78)),
1106
KEY `idx5` (`col174`,`col145`(108),`col23`(228),`col141`),
1107
KEY `idx6` (`col157`,`col140`),
1108
KEY `idx7` (`col130`(188),`col15`),
1109
KEY `idx8` (`col52`),
1110
KEY `idx9` (`col144`),
1111
KEY `idx10` (`col155`),
1112
KEY `idx11` (`col62`(230),`col1`(109)),
1113
KEY `idx12` (`col151`(24),`col95`(85)),
1114
KEY `idx13` (`col114`),
1115
KEY `idx14` (`col42`,`col98`(56),`col146`),
1116
KEY `idx15` (`col147`,`col39`(254),`col35`),
1117
KEY `idx16` (`col79`),
1118
KEY `idx17` (`col65`),
1119
KEY `idx18` (`col149`(165),`col168`(119),`col32`,`col117`),
1120
KEY `idx19` (`col64`),
1121
KEY `idx20` (`col93`),
1122
KEY `idx21` (`col64`,`col113`,`col104`(182)),
1123
KEY `idx22` (`col52`,`col111`(189)),
1124
KEY `idx23` (`col45`),
1125
KEY `idx24` (`col154`,`col107`,`col110`(159)),
1126
KEY `idx25` (`col149`(1),`col87`(131)),
1127
KEY `idx26` (`col58`,`col115`,`col63`),
1128
KEY `idx27` (`col95`(9),`col0`,`col87`(113)),
1129
KEY `idx28` (`col92`,`col130`(1)),
1130
KEY `idx29` (`col151`(129),`col137`(254),`col13`),
1131
KEY `idx30` (`col49`),
1132
KEY `idx31` (`col28`),
1133
KEY `idx32` (`col83`,`col146`),
1134
KEY `idx33` (`col155`,`col90`,`col17`(245)),
1135
KEY `idx34` (`col174`,`col169`(44),`col107`),
1136
KEY `idx35` (`col113`),
1137
KEY `idx36` (`col52`),
1138
KEY `idx37` (`col16`,`col120`(190)),
1139
KEY `idx38` (`col28`),
1140
KEY `idx39` (`col131`(165)),
1141
KEY `idx40` (`col135`,`col26`(86)),
1142
KEY `idx41` (`col69`,`col94`),
1143
KEY `idx42` (`col105`,`col151`(38),`col97`),
1144
KEY `idx43` (`col88`),
1145
KEY `idx44` (`col176`(100),`col42`,`col73`(189),`col94`),
1146
KEY `idx45` (`col2`(27),`col27`(116))
1147
)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
1149
DROP TABLE IF EXISTS table0;
1150
DROP TABLE IF EXISTS table1;
1151
DROP TABLE IF EXISTS table2;
1152
DROP TABLE IF EXISTS table3;
1153
DROP TABLE IF EXISTS table4;
1154
DROP TABLE IF EXISTS table5;
1155
DROP TABLE IF EXISTS table6;
1157
SET GLOBAL innodb_file_per_table=DEFAULT;
1158
SET GLOBAL innodb_file_format='Antelope';
1159
SET GLOBAL innodb_file_format_check='Antelope';