~drizzle-trunk/drizzle/development

1273.1.27 by Jay Pipes
Completes the work of removing the weirdness around transaction
1
DROP TABLE IF EXISTS t1_trx, t1_non_trx;
2
SET AUTOCOMMIT= 0;
3
CREATE TABLE t1_trx (
4
k VARCHAR(10) NOT NULL
5
, v VARCHAR(10) NOT NULL
6
, PRIMARY KEY (k)
7
) ENGINE=InnoDB;
8
CREATE TEMPORARY TABLE t1_non_trx (
9
k VARCHAR(10) NOT NULL
10
, v VARCHAR(10) NOT NULL
11
, PRIMARY KEY (k)
12
) ENGINE=MyISAM;
13
START TRANSACTION;
14
INSERT INTO t1_trx VALUES ('key1','value1');
15
INSERT INTO t1_trx VALUES ('key2','value2');
16
INSERT INTO t1_non_trx VALUES ('key1','value1');
17
INSERT INTO t1_non_trx VALUES ('key2','value2');
18
ROLLBACK;
19
Warnings:
20
Warning	1196	Some non-transactional changed tables couldn't be rolled back
21
Expected warning about non-trx data changes not being rolled back
22
SELECT * FROM t1_trx;
23
k	v
24
SELECT * FROM t1_non_trx;
25
k	v
26
key1	value1
27
key2	value2
28
START TRANSACTION;
29
INSERT INTO t1_trx VALUES ('key1','value1');
30
INSERT INTO t1_trx VALUES ('key2','value2');
31
SELECT t1_trx.k, t1_trx.v
32
FROM t1_trx
33
INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k;
34
k	v
35
key1	value1
36
key2	value2
37
ROLLBACK;
38
SELECT t1_trx.k, t1_trx.v
39
FROM t1_trx
40
INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k;
41
k	v
42
DROP TABLE t1_trx;
43
DROP TABLE t1_non_trx;