~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/suite/execute/t/transaction.test

Merge Joe, plus I updated the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
2
 
# Test for NON CONCURRENT transaction mix with EXECUTE
3
 
 
4
 
CREATE TABLE t1 (a SERIAL);
5
 
SET @insert_var= "INSERT INTO t1 VALUES()";
6
 
EXECUTE @insert_var;
7
 
SELECT a FROM t1;
8
 
 
9
 
SET AUTOCOMMIT= 0;
10
 
 
11
 
 
12
 
START TRANSACTION;
13
 
EXECUTE @insert_var;
14
 
COMMIT;
15
 
SELECT a FROM t1;
16
 
 
17
 
START TRANSACTION;
18
 
EXECUTE @insert_var;
19
 
ROLLBACK;
20
 
SELECT a FROM t1;
21
 
 
22
 
# We are generating an error in the EXECUTE, so the insert should be rolled
23
 
# back.
24
 
START TRANSACTION;
25
 
SET @insert_var= "INSERT INTO t1 VALUES(); SELECT WILL_ERROR;";
26
 
--error ER_PARSE_ERROR
27
 
EXECUTE @insert_var;
28
 
COMMIT;
29
 
SELECT a FROM t1;
30
 
 
31
 
SET AUTOCOMMIT= 1;
32
 
DROP TABLE t1;