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
|
--echo #
--echo # Bug#43448 - Server crashes on multi table delete with Innodb
--echo #
--source include/have_debug.inc
--source include/have_innodb.inc
--source include/no_valgrind_without_big.inc
SET @saved_dbug = @@SESSION.debug_dbug;
# crash requires ICP support in InnoDB
set session debug_dbug="+d,optimizer_innodb_icp";
CREATE TABLE t1 (
id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
t CHAR(12)
) ENGINE=InnoDB;
CREATE TABLE t2 (
id2 INT NOT NULL,
t CHAR(12)
) ENGINE=InnoDB;
CREATE TABLE t3(
id3 INT NOT NULL,
t CHAR(12),
INDEX(id3)
) ENGINE=InnoDB;
disable_query_log;
begin;
let $1 = 100;
while ($1)
{
let $2 = 5;
eval INSERT INTO t1(t) VALUES ('$1');
while ($2)
{
eval INSERT INTO t2(id2,t) VALUES ($1,'$2');
let $3 = 10;
while ($3)
{
eval INSERT INTO t3(id3,t) VALUES ($1,'$2');
dec $3;
}
dec $2;
}
dec $1;
}
commit;
enable_query_log;
SELECT COUNT(*) FROM t1 WHERE id1 > 90;
SELECT COUNT(*) FROM t2 WHERE id2 > 90;
SELECT COUNT(*) FROM t3 WHERE id3 > 90;
DELETE t1, t2, t3
FROM t1, t2, t3
WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5;
DROP TABLE t1, t2, t3;
SET debug_dbug= @saved_dbug;
|