📄 xastatetran.out
字号:
-- clean up transactionxa_end xa_success 40;ij> xa_rollback 40;ij> ----------------------------------------------- DEAD STATE (Transaction started and ended with a fail (rollback only))----------------------------------------------- set up dead statexa_start xa_noflags 40;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------(4 |IDLE |NULL |APP |UserTransaction ij> xa_end xa_fail 40;IJ ERROR: XA_RBROLLBACK ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------(4 |IDLE |NULL |APP |UserTransaction ij> xa_rollback 40;ij> -- the following should work <transaction is rolled back and forgotten)xa_start xa_noflags 40;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------(4 |IDLE |NULL |APP |UserTransaction ij> -- set up dead statexa_end xa_fail 40;IJ ERROR: XA_RBROLLBACK ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------(4 |IDLE |NULL |APP |UserTransaction ij> -- the following should error XA_RBROLLBACKxa_start xa_join 40;IJ ERROR: XA_RBROLLBACK ij> -- the following should error XA_RBROLLBACKxa_start xa_resume 40;IJ ERROR: XA_RBROLLBACK ij> -- the following should error XA_RBROLLBACKxa_end xa_success 40;IJ ERROR: XA_RBROLLBACK ij> -- the following should error XA_RBROLLBACKxa_end xa_fail 40;IJ ERROR: XA_RBROLLBACK ij> -- the following should error XA_RBROLLBACKxa_end xa_suspend 40;IJ ERROR: XA_RBROLLBACK ij> -- the following should error XA_RBROLLBACKxa_prepare 40;IJ ERROR: XA_RBROLLBACK ij> -- the following should error XA_RBROLLBACKxa_commit xa_1phase 40;IJ ERROR: XA_RBROLLBACK ij> -- the following should error XA_RBROLLBACKxa_commit xa_2phase 40;IJ ERROR: XA_RBROLLBACK ij> -- the following should error XAER_PROTOxa_forget 40;IJ ERROR: XAER_PROTO ij> xa_rollback 40;ij> ------------------------------------------------- PREPARE STATE (Transaction started and prepared)----------------------------------------------- set up prepare statexa_start xa_noflags 50;ij> insert into xastate values(2);1 row inserted/updated/deletedij> xa_end xa_success 50;ij> xa_prepare 50;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------(5 |PREPARED|false|APP |UserTransaction ij> -- the following should error XAER_DUPIDxa_start xa_noflags 50;IJ ERROR: XAER_DUPID ij> -- the following should error XAER_PROTOxa_start xa_join 50;IJ ERROR: XAER_PROTO ij> -- the following should error XAER_PROTOxa_start xa_resume 50;IJ ERROR: XAER_PROTO ij> -- the following should error XAER_PROTOxa_end xa_success 50;IJ ERROR: XAER_PROTO ij> -- the following should error XAER_PROTOxa_end xa_fail 50;IJ ERROR: XAER_PROTO ij> -- the following should error XAER_PROTOxa_end xa_suspend 50;IJ ERROR: XAER_PROTO ij> -- the following should error XAER_PROTOxa_prepare 50;IJ ERROR: XAER_PROTO ij> -- the following should error XAER_PROTOxa_commit xa_1phase 50;IJ ERROR: XAER_PROTO ij> -- the following should work xa_commit xa_2phase 50;ij> -- get back into prepared statexa_start xa_noflags 50;ij> insert into xastate values(2);1 row inserted/updated/deletedij> xa_end xa_success 50;ij> xa_prepare 50;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------(5 |PREPARED|false|APP |UserTransaction ij> -- the following should workxa_rollback 50;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------ij> -- get back into prepared statexa_start xa_noflags 50;ij> insert into xastate values(2);1 row inserted/updated/deletedij> xa_end xa_success 50;ij> xa_prepare 50;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------(5 |PREPARED|false|APP |UserTransaction ij> -- the following should error XAER_NOTA xa_forget 50;IJ ERROR: XAER_NOTA ij> ---- clean up transactionxa_rollback 50;ij> ----------------------------------------------- COMMIT STATE (Transaction started and commited)----------------------------------------------- set up commit statexa_start xa_noflags 60;ij> insert into xastate values(3);1 row inserted/updated/deletedij> xa_end xa_success 60;ij> xa_commit xa_1phase 60;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------ij> -- the following should work starting a new transactionxa_start xa_noflags 60;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------(6 |IDLE |NULL |APP |UserTransaction ij> -- get back to commit stateinsert into xastate values(4);1 row inserted/updated/deletedij> xa_end xa_success 60;ij> xa_commit xa_1phase 60;ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_start xa_join 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_start xa_resume 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_end xa_success 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_end xa_fail 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_end xa_suspend 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_prepare 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_commit xa_1phase 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_commit xa_2phase 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_rollback 60;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction committed and forgotten)xa_forget 60;IJ ERROR: XAER_NOTA ij> ------------------------------------------------- ABORT STATE (Transaction started and rolledback)----------------------------------------------- set up rollback statexa_start xa_noflags 70;ij> insert into xastate values(5);1 row inserted/updated/deletedij> xa_end xa_success 70;ij> xa_rollback 70;ij> select * from global_xactTable where gxid is not null order by gxid;GXID|STATUS |READ&|USERNAME |TYPE -------------------------------------------------------------ij> -- the following should work - start a new transactionxa_start xa_noflags 70;ij> -- get back to rollback stateinsert into xastate values(4);1 row inserted/updated/deletedij> xa_end xa_success 70;ij> xa_rollback 70;ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_start xa_join 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_start xa_resume 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_end xa_success 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_end xa_fail 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_end xa_suspend 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_prepare 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_commit xa_1phase 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_commit xa_2phase 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_rollback 70;IJ ERROR: XAER_NOTA ij> -- the following should error XAER_NOTA (transaction rolled back and forgotten)xa_forget 70;IJ ERROR: XAER_NOTA ij> ---- cleanup-- drop table xastate;0 rows inserted/updated/deletedij> drop view global_xactTable;0 rows inserted/updated/deletedij>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -