~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
#
2
# WL#1756
3
#
4
-- source include/have_innodb.inc
5
--disable_warnings
6
drop table if exists t1, t2;
7
--enable_warnings
8
create table t1 (a int) engine=innodb;
9
xa start 'test1';
10
insert t1 values (10);
11
xa end 'test1';
12
xa prepare 'test1';
13
xa rollback 'test1';
14
select * from t1;
15
16
xa start 'test2';
17
--error 1399
18
xa start 'test-bad';
19
insert t1 values (20);
20
--error 1399
21
xa prepare 'test2';
22
xa end 'test2';
23
xa prepare 'test2';
24
xa commit 'test2';
25
select * from t1;
26
27
xa start 'testa','testb';
28
insert t1 values (30);
29
30
--error 1399
31
commit;
32
33
xa end 'testa','testb';
34
35
--error 1399
36
begin;
37
--error 1399
38
create table t2 (a int);
39
40
connect (con1,localhost,root,,);
41
connection con1;
42
43
--error 1440
44
xa start 'testa','testb';
45
--error 1440
46
xa start 'testa','testb', 123;
47
48
#        gtrid [ , bqual [ , formatID ] ]
49
xa start 0x7465737462, 0x2030405060, 0xb;
50
insert t1 values (40);
51
xa end 'testb',' 0@P`',11;
52
xa prepare 'testb',0x2030405060,11;
53
54
--error 1399
55
start transaction;
56
57
xa recover;
58
59
# uncomment the line below when binlog will be able to prepare
60
#disconnect con1;
61
connection default;
62
63
xa prepare 'testa','testb';
64
65
xa recover;
66
67
--error 1397
68
xa commit 'testb',0x2030405060,11;
69
xa rollback 'testa','testb';
70
71
--error 1064
72
xa start 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
73
74
select * from t1;
75
drop table t1;
76