1
'#--------------------FN_DYNVARS_046_01-------------------------#'
2
SET @@global.innodb_support_xa = OFF;
3
'connect (con1,localhost,root,,,,)'
5
SELECT @@global.innodb_support_xa;
6
@@global.innodb_support_xa
8
SELECT @@session.innodb_support_xa;
9
@@session.innodb_support_xa
11
'#--------------------FN_DYNVARS_046_01-------------------------#'
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;
19
INSERT t1 values (10);
25
'---check when innodb_support_xa is 0---'
26
SET @@innodb_support_xa = 0;
28
INSERT t1 values (10);
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);
40
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state
41
xa end 'testa','testb';
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,,,,)'
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;
57
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
59
formatID gtrid_length bqual_length data
62
xa prepare 'testa','testb';
64
formatID gtrid_length bqual_length data
67
xa commit 'testb',0x2030405060,11;
68
ERROR XAE04: XAER_NOTA: Unknown XID
69
xa commit 'testa','testb';
71
xa rollback 'testb',0x2030405060,11;