3
3
let $MYSQLD_DATADIR= `select @@datadir`;
5
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
5
let $per_table=`select @@innodb_file_per_table`;
6
let $format=`select @@innodb_file_format`;
7
set global innodb_file_per_table=on;
8
set global innodb_file_format='Barracuda';
10
# Bug #12429576 - Test an assertion failure on purge.
11
CREATE TABLE t1_purge (
13
B BLOB, C BLOB, D BLOB, E BLOB,
14
F BLOB, G BLOB, H BLOB,
15
PRIMARY KEY (B(767), C(767), D(767), E(767), A),
17
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
19
INSERT INTO t1_purge VALUES (1,
20
REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
21
REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766));
23
CREATE TABLE t2_purge (
25
B BLOB, C BLOB, D BLOB, E BLOB,
26
F BLOB, G BLOB, H BLOB, I BLOB,
27
J BLOB, K BLOB, L BLOB,
28
INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
30
INSERT INTO t2_purge VALUES (1,
31
REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
32
REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766),
33
REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766));
35
CREATE TABLE t3_purge (
37
B VARCHAR(800), C VARCHAR(800), D VARCHAR(800), E VARCHAR(800),
38
F VARCHAR(800), G VARCHAR(800), H VARCHAR(800),
39
PRIMARY KEY (B(767), C(767), D(767), E(767), A),
41
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
43
INSERT INTO t3_purge SELECT * FROM t1_purge;
45
CREATE TABLE t4_purge (
47
B VARCHAR(800), C VARCHAR(800), D VARCHAR(800), E VARCHAR(800),
48
F VARCHAR(800), G VARCHAR(800), H VARCHAR(800), I VARCHAR(800),
49
J VARCHAR(800), K VARCHAR(800), L VARCHAR(800),
50
INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
52
INSERT INTO t4_purge SELECT * FROM t2_purge;
54
# This would trigger the failure (Bug #12429576)
55
# if purge gets a chance to run before DROP TABLE t1_purge, ....
60
# Instead of doing a --sleep 10, wait until the rest of the tests in
61
# this file complete before dropping the tables. By then, the purge thread
62
# will have delt with the updates above.
64
# Bug#12637786 - Bad assert by purge thread for records with external data
65
# used in secondary indexes.
66
SET @r=REPEAT('a',500);
67
CREATE TABLE t12637786(a INT,
68
v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
69
v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
70
v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
71
v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
72
v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
73
v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
74
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
75
CREATE INDEX idx1 ON t12637786(a,v1);
76
INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
77
UPDATE t12637786 SET a=1000;
78
DELETE FROM t12637786;
79
# We need to activate the purge thread at this point to make sure it does not
80
# assert and is able to clean up the old versions of secondary index entries.
81
# But instead of doing a --sleep 10, wait until the rest of the tests in
82
# this file complete before dropping the table. By then, the purge thread
83
# will have delt with the updates above.
85
# Bug#12963823 - Test that the purge thread does not crash when
86
# the number of indexes has changed since the UNDO record was logged.
87
create table t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
88
i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob)
89
engine=innodb row_format=dynamic;
90
SET @r = repeat('a', 767);
91
insert into t12963823 values (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r);
92
create index ndx_a on t12963823 (a(500));
93
create index ndx_b on t12963823 (b(500));
94
create index ndx_c on t12963823 (c(500));
95
create index ndx_d on t12963823 (d(500));
96
create index ndx_e on t12963823 (e(500));
97
create index ndx_f on t12963823 (f(500));
98
create index ndx_k on t12963823 (k(500));
99
create index ndx_l on t12963823 (l(500));
101
SET @r = repeat('b', 500);
102
update t12963823 set a=@r,b=@r,c=@r,d=@r;
103
update t12963823 set e=@r,f=@r,g=@r,h=@r;
104
update t12963823 set i=@r,j=@r,k=@r,l=@r;
105
update t12963823 set m=@r,n=@r,o=@r,p=@r;
106
alter table t12963823 drop index ndx_a;
107
alter table t12963823 drop index ndx_b;
108
create index ndx_g on t12963823 (g(500));
109
create index ndx_h on t12963823 (h(500));
110
create index ndx_i on t12963823 (i(500));
111
create index ndx_j on t12963823 (j(500));
112
create index ndx_m on t12963823 (m(500));
113
create index ndx_n on t12963823 (n(500));
114
create index ndx_o on t12963823 (o(500));
115
create index ndx_p on t12963823 (p(500));
116
show create table t12963823;
117
# We need to activate the purge thread at this point to see if it crashes
118
# but instead of doing a --sleep 10, wait until the rest of the tests in
119
# this file complete before dropping the table. By then, the purge thread
120
# will have delt with the updates above.
122
# Bug#13654923 BOGUS DEBUG ASSERTION IN INDEX CREATION FOR ZERO-LENGTH RECORD
123
create table t1(a varchar(2) primary key) engine=innodb;
124
insert into t1 values('');
125
create index t1a1 on t1(a(1));
128
eval set global innodb_file_per_table=$per_table;
129
eval set global innodb_file_format=$format;
7
131
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
8
132
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
404
530
create index t1u on t1 (u(1));
534
# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
535
CREATE TABLE bug12547647(
536
a INT NOT NULL, b BLOB NOT NULL, c TEXT,
537
PRIMARY KEY (b(10), a), INDEX (c(10))
538
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
539
INSERT INTO bug12547647 VALUES (5,repeat('khdfo5AlOq',1900),repeat('g',7731));
541
# The following used to cause infinite undo log allocation.
542
--error ER_TOO_BIG_ROWSIZE
543
UPDATE bug12547647 SET c = REPEAT('b',16928);
544
DROP TABLE bug12547647;
546
SET @r=REPEAT('a',500);
547
CREATE TABLE t1(a INT,
548
v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
549
v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
550
v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
551
v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
552
v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
553
v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
554
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
556
CREATE INDEX idx1 ON t1(a,v1);
557
INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
558
UPDATE t1 SET a=1000;
560
# Let the purge thread clean up this file.
407
564
eval set global innodb_file_per_table=$per_table;
408
565
eval set global innodb_file_format=$format;
409
566
eval set global innodb_file_format_check=$format;