~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/r/innodb_8k.result

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SET default_storage_engine=InnoDB;
 
2
SET GLOBAL innodb_file_format = `Barracuda`;
 
3
SET GLOBAL innodb_file_per_table = ON;
 
4
# Test 1) Show the page size from Information Schema
 
5
SELECT variable_value FROM information_schema.global_status
 
6
WHERE LOWER(variable_name) = 'innodb_page_size';
 
7
variable_value
 
8
8192
 
9
# Test 2) The number of buffer pool pages is dependent upon the page size.
 
10
SELECT variable_value FROM information_schema.global_status
 
11
WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
 
12
variable_value
 
13
{1023_or_1024}
 
14
# Test 3) Query some information_shema tables that are dependent upon
 
15
#         the page size.
 
16
INDEX_ID        NAME    TABLE_ID        TYPE    N_FIELDS        PAGE_NO SPACE
 
17
11      ID_IND  11      3       1       466     0
 
18
12      FOR_IND 11      0       1       467     0
 
19
13      REF_IND 11      0       1       468     0
 
20
14      ID_IND  12      3       2       469     0
 
21
15      SYS_TABLESPACES_SPACE   13      3       1       472     0
 
22
16      SYS_DATAFILES_SPACE     14      3       1       473     0
 
23
CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
 
24
CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
 
25
CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
 
26
CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
 
27
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
 
28
WHERE name LIKE 'test%' ORDER BY table_id;
 
29
TABLE_ID        NAME    FLAG    N_COLS  SPACE   FILE_FORMAT     ROW_FORMAT      ZIP_PAGE_SIZE
 
30
{id}    test/t1 0       5       {id}    Antelope        Redundant       0
 
31
{id}    test/t2 1       5       {id}    Antelope        Compact 0
 
32
{id}    test/t3 39      5       {id}    Barracuda       Compressed      4096
 
33
{id}    test/t4 33      5       {id}    Barracuda       Dynamic 0
 
34
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES
 
35
WHERE name LIKE 'test%' ORDER BY space;
 
36
SPACE   NAME    FLAG    FILE_FORMAT     ROW_FORMAT      PAGE_SIZE       ZIP_PAGE_SIZE
 
37
{id}    test/t1 256     Antelope        Compact or Redundant    8192    0
 
38
{id}    test/t2 256     Antelope        Compact or Redundant    8192    0
 
39
{id}    test/t3 295     Barracuda       Compressed      8192    4096
 
40
{id}    test/t4 289     Barracuda       Dynamic 8192    0
 
41
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_DATAFILES
 
42
WHERE path LIKE '%test%' ORDER BY space;
 
43
SPACE   PATH
 
44
{id}    MYSQLD_DATADIR/test/t1.ibd
 
45
{id}    MYSQLD_DATADIR/test/t2.ibd
 
46
{id}    MYSQLD_DATADIR/test/t3.ibd
 
47
{id}    MYSQLD_DATADIR/test/t4.ibd
 
48
DROP TABLE t1, t2, t3, t4;
 
49
# Test 4) The maximum row size is dependent upon the page size.
 
50
#         Redundant: 4027, Compact: 4030.
 
51
#         Compressed: 4030, Dynamic: 4030.
 
52
#         Each row format has its own amount of overhead that
 
53
#         varies depending on number of fields and other overhead.
 
54
SET SESSION innodb_strict_mode = ON;
 
55
CREATE TABLE t1 (
 
56
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
 
57
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
 
58
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
 
59
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155)
 
60
) ROW_FORMAT=redundant;
 
61
DROP TABLE t1;
 
62
CREATE TABLE t1 (
 
63
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
 
64
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
 
65
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
 
66
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156)
 
67
) ROW_FORMAT=redundant;
 
68
ERROR 42000: Row size too large (> max_row_size). 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.
 
69
CREATE TABLE t1 (
 
70
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
 
71
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
 
72
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
 
73
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
 
74
) ROW_FORMAT=compact;
 
75
DROP TABLE t1;
 
76
CREATE TABLE t1 (
 
77
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
 
78
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
 
79
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
 
80
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
 
81
) ROW_FORMAT=compact;
 
82
ERROR 42000: Row size too large (> max_row_size). 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.
 
83
CREATE TABLE t1 (
 
84
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
 
85
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
 
86
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
 
87
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103)
 
88
) ROW_FORMAT=compressed;
 
89
DROP TABLE t1;
 
90
CREATE TABLE t1 (
 
91
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
 
92
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
 
93
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
 
94
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106)
 
95
) ROW_FORMAT=compressed;
 
96
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
 
97
CREATE TABLE t1 (
 
98
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
 
99
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
 
100
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
 
101
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
 
102
) ROW_FORMAT=dynamic;
 
103
DROP TABLE t1;
 
104
CREATE TABLE t1 (
 
105
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
 
106
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
 
107
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
 
108
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
 
109
) ROW_FORMAT=dynamic;
 
110
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
 
111
CREATE TABLE t1 (a varchar(128) character set utf8,
 
112
b varchar(128) character set utf8,
 
113
c varchar(128) character set utf8,
 
114
d varchar(128) character set utf8,
 
115
PRIMARY KEY (a,b,c,d))
 
116
ENGINE=innodb;
 
117
DROP TABLE t1;
 
118
CREATE TABLE t1 (a varchar(128) character set utf8,
 
119
b varchar(128) character set utf8,
 
120
c varchar(128) character set utf8,
 
121
d varchar(129) character set utf8,
 
122
PRIMARY KEY (a,b,c,d))
 
123
ENGINE=innodb;
 
124
ERROR 42000: Specified key was too long; max key length is 1536 bytes
 
125
CREATE TABLE t1 (a varchar(128) character set utf8,
 
126
b varchar(128) character set utf8,
 
127
c varchar(128) character set utf8,
 
128
d varchar(128) character set utf8,
 
129
e varchar(128) character set utf8,
 
130
PRIMARY KEY (a), KEY (b,c,d,e))
 
131
ENGINE=innodb;
 
132
DROP TABLE t1;
 
133
CREATE TABLE t1 (a varchar(128) character set utf8,
 
134
b varchar(128) character set utf8,
 
135
c varchar(128) character set utf8,
 
136
d varchar(128) character set utf8,
 
137
e varchar(129) character set utf8,
 
138
PRIMARY KEY (a), KEY (b,c,d,e))
 
139
ENGINE=innodb;
 
140
ERROR 42000: Specified key was too long; max key length is 1536 bytes
 
141
# Test 5) Make sure that KEY_BLOCK_SIZE=8, 4, 2 & 1 are all 
 
142
#         accepted and that KEY_BLOCK_SIZE=16 is rejected in
 
143
#         strict mode and converted to 8 in non-strict mode.
 
144
SET SESSION innodb_strict_mode = ON;
 
145
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
 
146
ERROR HY000: Table storage engine for 't1' doesn't have this option
 
147
SHOW WARNINGS;
 
148
Level   Code    Message
 
149
Warning 1478    InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
 
150
Error   1031    Table storage engine for 't1' doesn't have this option
 
151
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
 
152
SHOW WARNINGS;
 
153
Level   Code    Message
 
154
SELECT table_name, row_format, create_options
 
155
FROM information_schema.tables WHERE table_name = 't1';
 
156
table_name      row_format      create_options
 
157
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=8
 
158
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
 
159
SHOW WARNINGS;
 
160
Level   Code    Message
 
161
SELECT table_name, row_format, create_options
 
162
FROM information_schema.tables WHERE table_name = 't1';
 
163
table_name      row_format      create_options
 
164
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=4
 
165
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
 
166
SHOW WARNINGS;
 
167
Level   Code    Message
 
168
SELECT table_name, row_format, create_options
 
169
FROM information_schema.tables WHERE table_name = 't1';
 
170
table_name      row_format      create_options
 
171
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=2
 
172
ALTER TABLE t1 KEY_BLOCK_SIZE=1;
 
173
SHOW WARNINGS;
 
174
Level   Code    Message
 
175
SELECT table_name, row_format, create_options
 
176
FROM information_schema.tables WHERE table_name = 't1';
 
177
table_name      row_format      create_options
 
178
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=1
 
179
ALTER TABLE t1 KEY_BLOCK_SIZE=0;
 
180
SHOW WARNINGS;
 
181
Level   Code    Message
 
182
SELECT table_name, row_format, create_options
 
183
FROM information_schema.tables WHERE table_name = 't1';
 
184
table_name      row_format      create_options
 
185
t1      Compressed      row_format=COMPRESSED
 
186
DROP TABLE t1;
 
187
SET SESSION innodb_strict_mode = OFF;
 
188
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
 
189
Warnings:
 
190
Warning 1478    InnoDB: ignoring KEY_BLOCK_SIZE=16.
 
191
SHOW WARNINGS;
 
192
Level   Code    Message
 
193
Warning 1478    InnoDB: ignoring KEY_BLOCK_SIZE=16.
 
194
SELECT table_name, row_format, create_options
 
195
FROM information_schema.tables WHERE table_name = 't1';
 
196
table_name      row_format      create_options
 
197
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=16
 
198
DROP TABLE t1;
 
199
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
 
200
SHOW WARNINGS;
 
201
Level   Code    Message
 
202
SELECT table_name, row_format, create_options
 
203
FROM information_schema.tables WHERE table_name = 't1';
 
204
table_name      row_format      create_options
 
205
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=8
 
206
DROP TABLE t1;
 
207
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 
208
SHOW WARNINGS;
 
209
Level   Code    Message
 
210
SELECT table_name, row_format, create_options
 
211
FROM information_schema.tables WHERE table_name = 't1';
 
212
table_name      row_format      create_options
 
213
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=4
 
214
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
 
215
SHOW WARNINGS;
 
216
Level   Code    Message
 
217
SELECT table_name, row_format, create_options
 
218
FROM information_schema.tables WHERE table_name = 't1';
 
219
table_name      row_format      create_options
 
220
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=2
 
221
ALTER TABLE t1 KEY_BLOCK_SIZE=1;
 
222
SHOW WARNINGS;
 
223
Level   Code    Message
 
224
SELECT table_name, row_format, create_options
 
225
FROM information_schema.tables WHERE table_name = 't1';
 
226
table_name      row_format      create_options
 
227
t1      Compressed      row_format=COMPRESSED KEY_BLOCK_SIZE=1
 
228
ALTER TABLE t1 KEY_BLOCK_SIZE=0;
 
229
SHOW WARNINGS;
 
230
Level   Code    Message
 
231
SELECT table_name, row_format, create_options
 
232
FROM information_schema.tables WHERE table_name = 't1';
 
233
table_name      row_format      create_options
 
234
t1      Compressed      row_format=COMPRESSED
 
235
DROP TABLE t1;
 
236
# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
 
237
# are rejected when innodb_file_per_table=OFF
 
238
SET SESSION innodb_strict_mode = ON;
 
239
SET GLOBAL innodb_file_per_table = OFF;
 
240
SHOW VARIABLES LIKE 'innodb_file_per_table';
 
241
Variable_name   Value
 
242
innodb_file_per_table   OFF
 
243
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
 
244
ERROR HY000: Table storage engine for 't4' doesn't have this option
 
245
SHOW WARNINGS;
 
246
Level   Code    Message
 
247
Warning 1478    InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
 
248
Error   1031    Table storage engine for 't4' doesn't have this option
 
249
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
 
250
ERROR HY000: Table storage engine for 't5' doesn't have this option
 
251
SHOW WARNINGS;
 
252
Level   Code    Message
 
253
Warning 1478    InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
 
254
Warning 1478    InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
 
255
Error   1031    Table storage engine for 't5' doesn't have this option
 
256
SET GLOBAL innodb_file_per_table = ON;
 
257
SET GLOBAL innodb_file_format = `Antelope`;
 
258
SHOW VARIABLES LIKE 'innodb_file%';
 
259
Variable_name   Value
 
260
innodb_file_format      Antelope
 
261
innodb_file_format_check        ON
 
262
innodb_file_format_max  Barracuda
 
263
innodb_file_per_table   ON
 
264
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
 
265
ERROR HY000: Table storage engine for 't4' doesn't have this option
 
266
SHOW WARNINGS;
 
267
Level   Code    Message
 
268
Warning 1478    InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
 
269
Error   1031    Table storage engine for 't4' doesn't have this option
 
270
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
 
271
ERROR HY000: Table storage engine for 't5' doesn't have this option
 
272
SHOW WARNINGS;
 
273
Level   Code    Message
 
274
Warning 1478    InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
 
275
Warning 1478    InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
 
276
Error   1031    Table storage engine for 't5' doesn't have this option
 
277
SET GLOBAL innodb_file_format = `Barracuda`;
 
278
# Test 7) Not included here; 16k only
 
279
# Test 8) Test creating a table that could lead to undo log overflow.
 
280
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
 
281
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
 
282
o blob,p blob,q blob,r blob,s blob,t blob,u blob)
 
283
ENGINE=InnoDB ROW_FORMAT=dynamic;
 
284
SET @a = repeat('a', 767);
 
285
SET @b = repeat('b', 767);
 
286
SET @c = repeat('c', 767);
 
287
SET @d = repeat('d', 767);
 
288
SET @e = repeat('e', 767);
 
289
INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
 
290
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
 
291
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
 
292
CREATE INDEX t1a ON t1 (a(767));
 
293
CREATE INDEX t1b ON t1 (b(767));
 
294
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
 
295
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
 
296
CREATE INDEX t1c ON t1 (c(767));
 
297
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
 
298
k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
 
299
ERROR HY000: Undo log record is too big.
 
300
BEGIN;
 
301
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
 
302
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
 
303
n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
 
304
COMMIT;
 
305
CREATE INDEX t1d ON t1 (d(767));
 
306
UPDATE t1 SET d=@e;
 
307
CREATE INDEX t1e ON t1 (e(767));
 
308
UPDATE t1 SET e=@e;
 
309
CREATE INDEX t1f ON t1 (f(767));
 
310
UPDATE t1 SET f=@e;
 
311
CREATE INDEX t1g ON t1 (g(767));
 
312
UPDATE t1 SET g=@e;
 
313
CREATE INDEX t1h ON t1 (h(767));
 
314
UPDATE t1 SET h=@e;
 
315
CREATE INDEX t1i ON t1 (i(767));
 
316
UPDATE t1 SET i=@e;
 
317
CREATE INDEX t1j ON t1 (j(767));
 
318
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
 
319
CREATE INDEX t1j ON t1 (j(500));
 
320
UPDATE t1 SET j=@e;
 
321
ERROR HY000: Undo log record is too big.
 
322
SHOW CREATE TABLE t1;
 
323
Table   Create Table
 
324
t1      CREATE TABLE `t1` (
 
325
  `a` blob,
 
326
  `b` blob,
 
327
  `c` blob,
 
328
  `d` blob,
 
329
  `e` blob,
 
330
  `f` blob,
 
331
  `g` blob,
 
332
  `h` blob,
 
333
  `i` blob,
 
334
  `j` blob,
 
335
  `k` blob,
 
336
  `l` blob,
 
337
  `m` blob,
 
338
  `n` blob,
 
339
  `o` blob,
 
340
  `p` blob,
 
341
  `q` blob,
 
342
  `r` blob,
 
343
  `s` blob,
 
344
  `t` blob,
 
345
  `u` blob,
 
346
  KEY `t1a` (`a`(767)),
 
347
  KEY `t1b` (`b`(767)),
 
348
  KEY `t1c` (`c`(767)),
 
349
  KEY `t1d` (`d`(767)),
 
350
  KEY `t1e` (`e`(767)),
 
351
  KEY `t1f` (`f`(767)),
 
352
  KEY `t1g` (`g`(767)),
 
353
  KEY `t1h` (`h`(767)),
 
354
  KEY `t1i` (`i`(767)),
 
355
  KEY `t1j` (`j`(500))
 
356
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
 
357
DROP TABLE t1;
 
358
SET SESSION innodb_strict_mode = OFF;
 
359
CREATE TABLE t1(
 
360
pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
 
361
pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
 
362
pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
 
363
pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
 
364
sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
 
365
sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
 
366
sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
 
367
sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
 
368
PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
 
369
pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
 
370
KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
 
371
sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
 
372
ROW_FORMAT=Redundant ENGINE=InnoDB;
 
373
SET @r = repeat('a', 96);
 
374
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
375
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
376
SET @r = repeat('b', 96);
 
377
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
378
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
379
SET @r = repeat('c', 96);
 
380
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
381
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
382
SET @r = repeat('d', 96);
 
383
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
384
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
385
SET @r = repeat('e', 96);
 
386
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
387
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
388
DELETE from t1;
 
389
DROP TABLE t1;
 
390
CREATE TABLE t1(
 
391
pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
 
392
pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
 
393
pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
 
394
pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
 
395
sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
 
396
sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
 
397
sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
 
398
sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
 
399
PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
 
400
pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
 
401
KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
 
402
sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
 
403
ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 ENGINE=InnoDB;
 
404
SET @r = repeat('a', 96);
 
405
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
406
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
407
SET @r = repeat('b', 96);
 
408
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
409
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
410
SET @r = repeat('c', 96);
 
411
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
412
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
413
SET @r = repeat('d', 96);
 
414
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
415
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
416
SET @r = repeat('e', 96);
 
417
INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
 
418
@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 
419
DELETE from t1;
 
420
DROP TABLE t1;
 
421
SET SESSION innodb_strict_mode = off;
 
422
CREATE TABLE t1(
 
423
c text NOT NULL, d text NOT NULL,
 
424
PRIMARY KEY (c(767),d(767)))
 
425
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
 
426
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
 
427
CREATE TABLE t1(
 
428
c text NOT NULL, d text NOT NULL,
 
429
PRIMARY KEY (c(767),d(767)))
 
430
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
 
431
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
 
432
CREATE TABLE t1(
 
433
c text NOT NULL, d text NOT NULL,
 
434
PRIMARY KEY (c(767),d(767)))
 
435
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
 
436
drop table t1;
 
437
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
 
438
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
 
439
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
 
440
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
 
441
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
 
442
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
 
443
DROP TABLE t1;