~drizzle-trunk/drizzle/development

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
Start Test of Bug 534806
SET AUTOCOMMIT = 0;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY);
COMMIT;
UPDATE t1 SET id = 2 WHERE id != 2 LIMIT 0;
SAVEPOINT A;
End Test of Bug 534806
DROP TABLE t1;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY);
START TRANSACTION;
INSERT INTO t1 VALUES (1);
SAVEPOINT A;
INSERT INTO t1 VALUES (2);
SAVEPOINT B;
INSERT INTO t1 VALUES (3);
COMMIT;
SELECT * FROM t1;
id
1
2
3
START TRANSACTION;
INSERT INTO t1 VALUES (4);
SAVEPOINT A;
INSERT INTO t1 VALUES (5);
SAVEPOINT B;
INSERT INTO t1 VALUES (6);
ROLLBACK;
SELECT * FROM t1;
id
1
2
3
START TRANSACTION;
INSERT INTO t1 VALUES (4);
SAVEPOINT A;
INSERT INTO t1 VALUES (5);
SAVEPOINT B;
INSERT INTO t1 VALUES (6);
ROLLBACK TO SAVEPOINT A;
COMMIT;
SELECT * FROM t1;
id
1
2
3
4
DROP TABLE t1;
Start Test of Bug 542299
CREATE TABLE t1 (a int,id integer auto_increment,b int,/*Indices*/key (a ),primary key (id)) ENGINE=innodb;
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);
SET AUTOCOMMIT=OFF;
DELETE FROM t1 WHERE 1 = 1 LIMIT 1;
COMMIT;
/* OR ROLLBACK... */
SAVEPOINT A;
INSERT INTO t1 ( a, b ) VALUES ( 1 , 9 );
ROLLBACK TO SAVEPOINT A;
End Test of Bug 542299