1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
|
--- page_size.result
+++ page_size,4k.result
@@ -3,7 +3,7 @@
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
variable_value
-16384
+4096
# Test 3) Query some information_shema tables that are dependent upon
# the page size.
SELECT t.name table_name, t.n_cols, t.flag table_flags,
@@ -36,13 +36,13 @@
table_name n_cols table_flags index_name root_page type n_fields merge_threshold
test/t1 5 0 PRIMARY 3 3 1 50
test/t2 5 1 PRIMARY 3 3 1 50
-test/t3 5 41 PRIMARY 3 3 1 50
+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 Path
test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd
test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd
-test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
+test/t3 Single DEFAULT 2048 MYSQLD_DATADIR/test/t3.ibd
test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
DROP TABLE t1, t2, t3, t4;
# Test 4) The maximum row size is dependent upon the page size.
@@ -51,141 +51,90 @@
SET SESSION innodb_strict_mode = ON;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(211)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127)
) ROW_FORMAT=redundant;
DROP TABLE t1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(212)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128)
) ROW_FORMAT=redundant;
-ERROR 42000: Row size too large (> 8123). 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 (> 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.
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
) ROW_FORMAT=compact;
DROP TABLE t1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
) ROW_FORMAT=compact;
-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 (> 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.
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
) ROW_FORMAT=compressed;
DROP TABLE t1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(160)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79)
) ROW_FORMAT=compressed;
-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 (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
) ROW_FORMAT=dynamic;
DROP TABLE t1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
) ROW_FORMAT=dynamic;
-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.
-CREATE TABLE t1 (a varchar(255) character set utf8,
-b varchar(255) character set utf8,
-c varchar(255) character set utf8,
-d varchar(255) character set utf8,
-e varchar(4) character set utf8,
-PRIMARY KEY (a,b,c,d,e))
+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.
+CREATE TABLE t1 (a varchar(98) character set utf8,
+b varchar(98) character set utf8,
+c varchar(98) character set utf8,
+d varchar(97) character set utf8,
+PRIMARY KEY (a,b,c,d))
ENGINE=innodb;
DROP TABLE t1;
-CREATE TABLE t1 (a varchar(255) character set utf8,
-b varchar(255) character set utf8,
-c varchar(255) character set utf8,
-d varchar(255) character set utf8,
-e varchar(5) character set utf8,
-PRIMARY KEY (a,b,c,d,e))
+CREATE TABLE t1 (a varchar(98) character set utf8,
+b varchar(98) character set utf8,
+c varchar(98) character set utf8,
+d varchar(98) character set utf8,
+PRIMARY KEY (a,b,c,d))
ENGINE=innodb;
-ERROR 42000: Specified key was too long; max key length is 3072 bytes
-CREATE TABLE t1 (a varchar(255) character set utf8,
-b varchar(255) character set utf8,
-c varchar(255) character set utf8,
-d varchar(255) character set utf8,
-e varchar(255) character set utf8,
-f varchar(4) character set utf8,
-PRIMARY KEY (a), KEY (b,c,d,e,f))
+ERROR 42000: Specified key was too long; max key length is 1173 bytes
+CREATE TABLE t1 (a varchar(98) character set utf8,
+b varchar(98) character set utf8,
+c varchar(98) character set utf8,
+d varchar(98) character set utf8,
+e varchar(97) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
ENGINE=innodb;
DROP TABLE t1;
-CREATE TABLE t1 (a varchar(255) character set utf8,
-b varchar(255) character set utf8,
-c varchar(255) character set utf8,
-d varchar(255) character set utf8,
-e varchar(255) character set utf8,
-f varchar(5) character set utf8,
-PRIMARY KEY (a), KEY (b,c,d,e,f))
+CREATE TABLE t1 (a varchar(98) character set utf8,
+b varchar(98) character set utf8,
+c varchar(98) character set utf8,
+d varchar(98) character set utf8,
+e varchar(98) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
ENGINE=innodb;
-ERROR 42000: Specified key was too long; max key length is 3072 bytes
+ERROR 42000: Specified key was too long; max key length is 1173 bytes
# Test 5) KEY_BLOCK_SIZE validation
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-SELECT table_name, row_format, create_options
-FROM information_schema.tables WHERE table_name = 't1';
-table_name row_format create_options
-t1 Compressed row_format=COMPRESSED key_block_size=16
-ALTER TABLE t1 KEY_BLOCK_SIZE=8;
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-SELECT table_name, row_format, create_options
-FROM information_schema.tables WHERE table_name = 't1';
-table_name row_format create_options
-t1 Compressed row_format=COMPRESSED key_block_size=8
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
SHOW WARNINGS;
Level Code Message
@@ -217,15 +166,21 @@
DROP TABLE t1;
SET SESSION innodb_strict_mode = OFF;
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
SHOW WARNINGS;
Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
table_name row_format create_options
t1 Compressed row_format=COMPRESSED key_block_size=16
ALTER TABLE t1 KEY_BLOCK_SIZE=8;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
SHOW WARNINGS;
Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
SELECT table_name, row_format, create_options
FROM information_schema.tables WHERE table_name = 't1';
table_name row_format create_options
@@ -269,6 +224,7 @@
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
@@ -276,105 +232,11 @@
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SET GLOBAL innodb_file_per_table = ON;
-# Test 7) This series of tests were moved from innodb-index to here
-# because the second alter table t1 assumes a 16k page size.
-# Moving the test allows the rest of innodb-index to be run on all
-# page sizes. The previously disabled portions of this test were
-# moved as well.
-CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8;
-CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb;
-INSERT INTO t3 VALUES (22),(44),(33),(55),(66);
-INSERT INTO t2 VALUES ('jejdkrun87'),('adfd72nh9k'),
-('adfdpplkeock'),('adfdijnmnb78k'),('adfdijn0loKNHJik');
-CREATE TABLE t1(a int, b blob, c text, d text NOT NULL)
-ENGINE=innodb DEFAULT CHARSET=utf8 STATS_PERSISTENT=0;
-INSERT INTO t1
-SELECT a,LEFT(REPEAT(d,100*a),65535),REPEAT(d,20*a),d FROM t2,t3 order by a, d;
-DROP TABLE t2, t3;
-SELECT COUNT(*) FROM t1 WHERE a=44;
-COUNT(*)
-5
-SELECT a,
-LENGTH(b),b=LEFT(REPEAT(d,100*a),65535),LENGTH(c),c=REPEAT(d,20*a),d FROM t1
-ORDER BY 1, 2, 3, 4, 5, 6;
-a LENGTH(b) b=LEFT(REPEAT(d,100*a),65535) LENGTH(c) c=REPEAT(d,20*a) d
-22 22000 1 4400 1 adfd72nh9k
-22 22000 1 4400 1 jejdkrun87
-22 26400 1 5280 1 adfdpplkeock
-22 28600 1 5720 1 adfdijnmnb78k
-22 35200 1 7040 1 adfdijn0loKNHJik
-33 33000 1 6600 1 adfd72nh9k
-33 33000 1 6600 1 jejdkrun87
-33 39600 1 7920 1 adfdpplkeock
-33 42900 1 8580 1 adfdijnmnb78k
-33 52800 1 10560 1 adfdijn0loKNHJik
-44 44000 1 8800 1 adfd72nh9k
-44 44000 1 8800 1 jejdkrun87
-44 52800 1 10560 1 adfdpplkeock
-44 57200 1 11440 1 adfdijnmnb78k
-44 65535 1 14080 1 adfdijn0loKNHJik
-55 55000 1 11000 1 adfd72nh9k
-55 55000 1 11000 1 jejdkrun87
-55 65535 1 13200 1 adfdpplkeock
-55 65535 1 14300 1 adfdijnmnb78k
-55 65535 1 17600 1 adfdijn0loKNHJik
-66 65535 1 13200 1 adfd72nh9k
-66 65535 1 13200 1 jejdkrun87
-66 65535 1 15840 1 adfdpplkeock
-66 65535 1 17160 1 adfdijnmnb78k
-66 65535 1 21120 1 adfdijn0loKNHJik
-ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20));
-ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
-DELETE FROM t1 WHERE d='null';
-ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20));
-ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
-DELETE FROM t1 WHERE a%2;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-ALTER TABLE t1 ADD PRIMARY KEY (a,b(255),c(255)), ADD KEY (b(767));
-SELECT COUNT(*) FROM t1 WHERE a=44;
-COUNT(*)
-5
-SELECT a,
-LENGTH(b), b=LEFT(REPEAT(d,100*a), 65535),LENGTH(c), c=REPEAT(d,20*a), d FROM t1;
-a LENGTH(b) b=LEFT(REPEAT(d,100*a), 65535) LENGTH(c) c=REPEAT(d,20*a) d
-22 22000 1 4400 1 adfd72nh9k
-22 35200 1 7040 1 adfdijn0loKNHJik
-22 28600 1 5720 1 adfdijnmnb78k
-22 26400 1 5280 1 adfdpplkeock
-22 22000 1 4400 1 jejdkrun87
-44 44000 1 8800 1 adfd72nh9k
-44 65535 1 14080 1 adfdijn0loKNHJik
-44 57200 1 11440 1 adfdijnmnb78k
-44 52800 1 10560 1 adfdpplkeock
-44 44000 1 8800 1 jejdkrun87
-66 65535 1 13200 1 adfd72nh9k
-66 65535 1 21120 1 adfdijn0loKNHJik
-66 65535 1 17160 1 adfdijnmnb78k
-66 65535 1 15840 1 adfdpplkeock
-66 65535 1 13200 1 jejdkrun87
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL,
- `b` blob NOT NULL,
- `c` text NOT NULL,
- `d` text NOT NULL,
- PRIMARY KEY (`a`,`b`(255),`c`(255)),
- KEY `b` (`b`(767))
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 769 NULL # Using where
-DROP TABLE t1;
# Test 8) Test creating a table that could lead to undo log overflow.
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
@@ -389,10 +251,6 @@
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
CREATE INDEX t1a ON t1 (a(767));
-CREATE INDEX t1b ON t1 (b(767));
-CREATE INDEX t1c ON t1 (c(767));
-CREATE INDEX t1d ON t1 (d(767));
-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));
@@ -407,37 +265,15 @@
COMMIT;
CREATE INDEX t1g ON t1 (g(767));
UPDATE t1 SET g=@e;
-CREATE INDEX t1h ON t1 (h(767));
-UPDATE t1 SET h=@e;
-CREATE INDEX t1i ON t1 (i(767));
-UPDATE t1 SET i=@e;
-CREATE INDEX t1j ON t1 (j(767));
-UPDATE t1 SET j=@e;
-CREATE INDEX t1k ON t1 (k(767));
-UPDATE t1 SET k=@e;
-CREATE INDEX t1l ON t1 (l(767));
-UPDATE t1 SET l=@e;
-CREATE INDEX t1m ON t1 (m(767));
-UPDATE t1 SET m=@e;
-CREATE INDEX t1n ON t1 (n(767));
-UPDATE t1 SET n=@e;
-CREATE INDEX t1o ON t1 (o(767));
-UPDATE t1 SET o=@e;
-CREATE INDEX t1p ON t1 (p(767));
-UPDATE t1 SET p=@e;
-CREATE INDEX t1q ON t1 (q(767));
-UPDATE t1 SET q=@e;
-CREATE INDEX t1r ON t1 (r(767));
-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;
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));
+CREATE INDEX t1ut ON t1 (u(767));
+Warnings:
+Note 1831 Duplicate index `t1ut`. This is deprecated and will be disallowed in a future release
+CREATE INDEX t1st ON t1 (s(767));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -463,28 +299,12 @@
`t` blob DEFAULT NULL,
`u` blob DEFAULT NULL,
KEY `t1a` (`a`(767)),
- KEY `t1b` (`b`(767)),
- KEY `t1c` (`c`(767)),
- KEY `t1d` (`d`(767)),
- KEY `t1e` (`e`(767)),
KEY `t1f` (`f`(767)),
KEY `t1g` (`g`(767)),
- KEY `t1h` (`h`(767)),
- KEY `t1i` (`i`(767)),
- KEY `t1j` (`j`(767)),
- KEY `t1k` (`k`(767)),
- KEY `t1l` (`l`(767)),
- KEY `t1m` (`m`(767)),
- KEY `t1n` (`n`(767)),
- KEY `t1o` (`o`(767)),
- KEY `t1p` (`p`(767)),
- KEY `t1q` (`q`(767)),
- KEY `t1r` (`r`(767)),
- KEY `t1s` (`s`(767)),
KEY `t1t` (`t`(767)),
KEY `t1u` (`u`(767)),
- KEY `t1ut` (`u`(767),`t`(767)),
- KEY `t1st` (`s`(767),`t`(767))
+ KEY `t1ut` (`u`(767)),
+ KEY `t1st` (`s`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
DROP TABLE t1;
# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
@@ -565,27 +385,25 @@
DROP TABLE t1;
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
-PRIMARY KEY (c(767),d(767)))
+PRIMARY KEY (c(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
Warnings:
-Warning 139 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.
+Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
DROP TABLE t1;
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
-PRIMARY KEY (c(767),d(767)))
+PRIMARY KEY (c(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
-Warnings:
-Warning 139 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.
DROP TABLE t1;
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
-PRIMARY KEY (c(767),d(767)))
+PRIMARY KEY (c(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
DROP TABLE t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
Warnings:
-Warning 139 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.
+Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
DROP TABLE t1;
CREATE TABLE t1(c text, PRIMARY KEY (c(438)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|