~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/r/innodb_support_xa_func.result

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'#--------------------FN_DYNVARS_046_01-------------------------#'
 
2
SET @@global.innodb_support_xa = OFF;
 
3
'connect (con1,localhost,root,,,,)'
 
4
'connection con1'
 
5
SELECT @@global.innodb_support_xa;
 
6
@@global.innodb_support_xa
 
7
0
 
8
SELECT @@session.innodb_support_xa;
 
9
@@session.innodb_support_xa
 
10
0
 
11
'#--------------------FN_DYNVARS_046_01-------------------------#'
 
12
'connection default'
 
13
SET @@global.innodb_support_xa = 1;
 
14
drop table if exists t1, t2;
 
15
create table t1 (a int) engine=innodb;
 
16
'---check when innodb_support_xa is 1---'
 
17
SET @@innodb_support_xa = 1;
 
18
xa start 'test1';
 
19
INSERT t1 values (10);
 
20
xa end 'test1';
 
21
xa prepare 'test1';
 
22
xa rollback 'test1';
 
23
SELECT * from t1;
 
24
a
 
25
'---check when innodb_support_xa is 0---'
 
26
SET @@innodb_support_xa = 0;
 
27
xa start 'test1';
 
28
INSERT t1 values (10);
 
29
xa end 'test1';
 
30
xa prepare 'test1';
 
31
xa rollback 'test1';
 
32
SELECT * from t1;
 
33
a
 
34
'------general xa testing--------'
 
35
SET @@global.innodb_support_xa = 1;
 
36
SET @@innodb_support_xa = 1;
 
37
xa start 'testa','testb';
 
38
INSERT t1 values (30);
 
39
COMMIT;
 
40
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the  ACTIVE state
 
41
xa end 'testa','testb';
 
42
BEGIN;
 
43
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the  IDLE state
 
44
CREATE table t2 (a int);
 
45
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the  IDLE state
 
46
'connect (con1,localhost,root,,,,)'
 
47
'connection con1'
 
48
xa start 'testa','testb';
 
49
ERROR XAE08: XAER_DUPID: The XID already exists
 
50
xa start 'testa','testb', 123;
 
51
ERROR XAE08: XAER_DUPID: The XID already exists
 
52
xa start 0x7465737462, 0x2030405060, 0xb;
 
53
INSERT t1 values (40);
 
54
xa end 'testb',' 0@P`',11;
 
55
xa prepare 'testb',0x2030405060,11;
 
56
START TRANSACTION;
 
57
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the  PREPARED state
 
58
xa recover;
 
59
formatID        gtrid_length    bqual_length    data
 
60
11      5       5       testb 0@P`
 
61
'connection default'
 
62
xa prepare 'testa','testb';
 
63
xa recover;
 
64
formatID        gtrid_length    bqual_length    data
 
65
11      5       5       testb 0@P`
 
66
1       5       5       testatestb
 
67
xa commit 'testb',0x2030405060,11;
 
68
ERROR XAE04: XAER_NOTA: Unknown XID
 
69
xa commit 'testa','testb';
 
70
'connection con1'
 
71
xa rollback 'testb',0x2030405060,11;
 
72
SELECT * from t1;
 
73
a
 
74
30
 
75
DROP table t1;