summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb_zip/r/index_large_prefix.result
blob: 4bb57b2edfa346dec4418f4dc2d8b3765a477259 (plain)
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
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
SET default_storage_engine=InnoDB;
set global innodb_file_per_table=1;
### Test 1 ###
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
show warnings;
Level	Code	Message
insert into worklog5743 values(repeat("a", 20000));
update worklog5743 set a = (repeat("b", 16000));
create index idx on worklog5743(a(2000));
show warnings;
Level	Code	Message
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
READ-UNCOMMITTED
select a = repeat("x", 17000) from worklog5743;
a = repeat("x", 17000)
1
connection default;
rollback;
drop table worklog5743;
### Test 2 ###
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
show warnings;
Level	Code	Message
create index idx on worklog5743(a1, a2(2000));
show warnings;
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	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 ###
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
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	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 ###
create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx1 on worklog5743_1(a2(4000));
Got one of the listed errors
show warnings;
Level	Code	Message
Note	1071	Specified key was too long; max key length is 767 bytes
Error	1118	Row size is greater than 900. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx2 on worklog5743_1(a2(4000));
Got one of the listed errors
show warnings;
Level	Code	Message
Note	1071	Specified key was too long; max key length is 3072 bytes
Error	1118	Row size is greater than 900. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx3 on worklog5743_1(a2(438));
ERROR 42000: Row size is greater than 900. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level	Code	Message
Error	1118	Row size is greater than 900. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx4 on worklog5743_1(a2(434));
show warnings;
Level	Code	Message
create index idx5 on worklog5743_1(a1, a2(432));
ERROR 42000: Row size is greater than 898. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level	Code	Message
Error	1118	Row size is greater than 898. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
Level	Code	Message
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
SET sql_mode= '';
create index idx1 on worklog5743_2(a2(4000));
Warnings:
Note	1071	Specified key was too long; max key length is 767 bytes
show warnings;
Level	Code	Message
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx2 on worklog5743_2(a2(4000));
ERROR 42000: Row size is greater than 1924. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level	Code	Message
Note	1071	Specified key was too long; max key length is 3072 bytes
Error	1118	Row size is greater than 1924. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx3 on worklog5743_2(a2(950));
ERROR 42000: Row size is greater than 1924. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level	Code	Message
Error	1118	Row size is greater than 1924. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx4 on worklog5743_2(a2(946));
show warnings;
Level	Code	Message
create index idx5 on worklog5743_2(a1, a2(944));
ERROR 42000: Row size is greater than 1922. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level	Code	Message
Error	1118	Row size is greater than 1922. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx6 on worklog5743_2(a1, a2(940));
show warnings;
Level	Code	Message
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx1 on worklog5743_4(a2(4000));
Warnings:
Note	1071	Specified key was too long; max key length is 767 bytes
show warnings;
Level	Code	Message
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx2 on worklog5743_4(a2(4000));
ERROR 42000: Row size is greater than 3972. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level	Code	Message
Note	1071	Specified key was too long; max key length is 3072 bytes
Error	1118	Row size is greater than 3972. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx3 on worklog5743_4(a2(1974));
ERROR 42000: Row size is greater than 3972. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level	Code	Message
Error	1118	Row size is greater than 3972. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx4 on worklog5743_4(a2(1970));
show warnings;
Level	Code	Message
create index idx5 on worklog5743_4(a1, a2(1968));
ERROR 42000: Row size is greater than 3970. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level	Code	Message
Error	1118	Row size is greater than 3970. Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
create index idx6 on worklog5743_4(a1, a2(1964));
show warnings;
Level	Code	Message
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx1 on worklog5743_8(a2(1000));
Warnings:
Note	1071	Specified key was too long; max key length is 767 bytes
show warnings;
Level	Code	Message
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx2 on worklog5743_8(a2(3073));
Warnings:
Note	1071	Specified key was too long; max key length is 3072 bytes
show warnings;
Level	Code	Message
Note	1071	Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743_8(a2(3072));
Warnings:
Note	1831	Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
show warnings;
Level	Code	Message
Note	1831	Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
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;
Warnings:
Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx1 on worklog5743_16(a2(1000));
Warnings:
Note	1071	Specified key was too long; max key length is 767 bytes
show warnings;
Level	Code	Message
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 https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
create index idx2 on worklog5743_16(a2(3073));
Warnings:
Note	1071	Specified key was too long; max key length is 3072 bytes
show warnings;
Level	Code	Message
Note	1071	Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743_16(a2(3072));
Warnings:
Note	1831	Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
show warnings;
Level	Code	Message
Note	1831	Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
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
set sql_mode= default;
insert into worklog5743_1 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_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;
Warnings:
Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
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;
Warnings:
Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
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;
update worklog5743_1 set a1 = 1000;
update worklog5743_2 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
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	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	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	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	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	worklog5743_8	ref	idx5,idx7	idx5	5	const	1	
explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	worklog5743_16	ref	idx5,idx7	idx5	5	const	1	
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
a1	left(a2, 20)
9	aaaaaaaaaaaaaaaaaaaa
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
a1	left(a2, 20)
9	aaaaaaaaaaaaaaaaaaaa
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
a1	left(a2, 20)
9	aaaaaaaaaaaaaaaaaaaa
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
a1	left(a2, 20)
9	aaaaaaaaaaaaaaaaaaaa
select a1, left(a2, 20) from worklog5743_16 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
READ-UNCOMMITTED
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
a1	left(a2, 20)
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)
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
a1	left(a2, 20)
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
a1	left(a2, 20)
connection default;
rollback;
drop table worklog5743_1;
drop table worklog5743_2;
drop table worklog5743_4;
drop table worklog5743_8;
drop table worklog5743_16;
### Test 5 ###
create table worklog5743(a1 int,
a2 varchar(20000),
a3 varchar(3073),
a4 varchar(3072),
a5 varchar(3069),
a6 varchar(3068))
ROW_FORMAT=DYNAMIC;
SET sql_mode='';
create index idx1 on worklog5743(a2);
Warnings:
Warning	1071	Specified key was too long; max key length is 3072 bytes
create index idx2 on worklog5743(a3);
Warnings:
Warning	1071	Specified key was too long; max key length is 3072 bytes
create index idx3 on worklog5743(a4);
show warnings;
Level	Code	Message
SET sql_mode= default;
create index idx4 on worklog5743(a1, a2);
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 3072 bytes
create index idx5 on worklog5743(a1, a5);
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 idx6 on worklog5743(a1, a6);
show warnings;
Level	Code	Message
show create table worklog5743;
Table	Create Table
worklog5743	CREATE TABLE `worklog5743` (
  `a1` int(11) DEFAULT NULL,
  `a2` varchar(20000) DEFAULT NULL,
  `a3` varchar(3073) DEFAULT NULL,
  `a4` varchar(3072) DEFAULT NULL,
  `a5` varchar(3069) DEFAULT NULL,
  `a6` varchar(3068) DEFAULT NULL,
  KEY `idx1` (`a2`(3072)),
  KEY `idx2` (`a3`(3072)),
  KEY `idx3` (`a4`),
  KEY `idx6` (`a1`,`a6`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
insert into worklog5743 values(9,
repeat("a", 20000), repeat("a", 3073),
repeat("a", 3072), repeat("a", 3069),
repeat("a", 3068));
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	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	worklog5743	ref	idx6	idx6	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 ###
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
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
create index idx on worklog5743(a(767));
insert into worklog5743 values(repeat("a", 20000));
begin;
insert into worklog5743 values(repeat("b", 20000));
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
READ-UNCOMMITTED
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='';
create index idx1 on worklog5743(a(3073));
Warnings:
Note	1071	Specified key was too long; max key length is 3072 bytes
create index idx2 on worklog5743(a(3072));
Warnings:
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` (
  `a` text NOT NULL,
  KEY `idx1` (`a`(3072)),
  KEY `idx2` (`a`(3072))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
drop table worklog5743;
SET sql_mode= default;
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
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
create index idx2 on worklog5743(a(767));
drop table worklog5743;
SET GLOBAL innodb_file_per_table=1;