~drizzle-trunk/drizzle/development

1491.2.2 by Jay Pipes
Reduce large test case for savepoints on Bug 542299 down to the smallest reproduceable test case.
1
Start Test of Bug 534806
1333.1.2 by Jay Pipes
Add savepoint test case
2
SET AUTOCOMMIT = 0;
3
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY);
4
COMMIT;
5
UPDATE t1 SET id = 2 WHERE id != 2 LIMIT 0;
6
SAVEPOINT A;
1491.2.2 by Jay Pipes
Reduce large test case for savepoints on Bug 542299 down to the smallest reproduceable test case.
7
End Test of Bug 534806
1333.1.2 by Jay Pipes
Add savepoint test case
8
DROP TABLE t1;
9
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY);
10
START TRANSACTION;
11
INSERT INTO t1 VALUES (1);
12
SAVEPOINT A;
13
INSERT INTO t1 VALUES (2);
14
SAVEPOINT B;
15
INSERT INTO t1 VALUES (3);
16
COMMIT;
17
SELECT * FROM t1;
18
id
19
1
20
2
21
3
22
START TRANSACTION;
23
INSERT INTO t1 VALUES (4);
24
SAVEPOINT A;
25
INSERT INTO t1 VALUES (5);
26
SAVEPOINT B;
27
INSERT INTO t1 VALUES (6);
28
ROLLBACK;
29
SELECT * FROM t1;
30
id
31
1
32
2
33
3
34
START TRANSACTION;
35
INSERT INTO t1 VALUES (4);
36
SAVEPOINT A;
37
INSERT INTO t1 VALUES (5);
38
SAVEPOINT B;
39
INSERT INTO t1 VALUES (6);
40
ROLLBACK TO SAVEPOINT A;
41
COMMIT;
42
SELECT * FROM t1;
43
id
44
1
45
2
46
3
47
4
48
DROP TABLE t1;
1491.2.1 by Jay Pipes
Add exact SQL that produces bug #542299 to the savepoints.test case.
49
Start Test of Bug 542299
50
CREATE TABLE t1 (a int,id integer auto_increment,b int,/*Indices*/key (a ),primary key (id)) ENGINE=innodb;
51
INSERT INTO t1 VALUES  (100, NULL, 100) ,  (100, NULL, 100) ,  (100, NULL, 100) ,  (100, NULL, 100) ,  (100, NULL, 100) ,  (100, NULL, 100) ,  (100, NULL, 100) ,  (100, NULL, 100);
1491.2.2 by Jay Pipes
Reduce large test case for savepoints on Bug 542299 down to the smallest reproduceable test case.
52
SET AUTOCOMMIT=OFF;
53
DELETE FROM t1 WHERE 1 = 1 LIMIT 1;
54
COMMIT;
55
/* OR ROLLBACK... */
56
SAVEPOINT A;
57
INSERT INTO t1 ( a, b ) VALUES ( 1 , 9 );
58
ROLLBACK TO SAVEPOINT A;
1491.2.1 by Jay Pipes
Add exact SQL that produces bug #542299 to the savepoints.test case.
59
End Test of Bug 542299