| 1 |
# BUG#12161 Xa recovery and client disconnection |
| 2 |
# |
| 3 |
# The test verifies correct XA transaction two phase logging and its applying |
| 4 |
# in a case the transaction updates transactional and non-transactional tables. |
| 5 |
# Transactions are terminated according to specfied parameters to |
| 6 |
# a sourced inc-file. |
| 7 |
--source include/force_myisam_default.inc |
| 8 |
--source include/have_myisam.inc |
| 9 |
--source include/master-slave.inc |
| 10 |
|
| 11 |
--source include/rpl_connection_master.inc |
| 12 |
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
| 13 |
|
| 14 |
--let $command=setup |
| 15 |
--source extra/rpl_tests/rpl_xa_mixed_engines.inc |
| 16 |
|
| 17 |
--echo === COMMIT === |
| 18 |
--let $command=run |
| 19 |
--let $xa_terminate=XA COMMIT |
| 20 |
--let $xa_prepare_opt=1 |
| 21 |
--source extra/rpl_tests/rpl_xa_mixed_engines.inc |
| 22 |
|
| 23 |
--source include/sync_slave_sql_with_master.inc |
| 24 |
--source include/rpl_connection_master.inc |
| 25 |
|
| 26 |
--echo === COMMIT ONE PHASE === |
| 27 |
|
| 28 |
--let $command=run |
| 29 |
--let $xa_terminate=XA COMMIT |
| 30 |
--let $one_phase=ONE PHASE |
| 31 |
--let $xa_prepare_opt= |
| 32 |
--source extra/rpl_tests/rpl_xa_mixed_engines.inc |
| 33 |
--let $one_phase= |
| 34 |
--source include/sync_slave_sql_with_master.inc |
| 35 |
--source include/rpl_connection_master.inc |
| 36 |
|
| 37 |
--echo === ROLLBACK with PREPARE === |
| 38 |
|
| 39 |
--let $command=run |
| 40 |
--let $xa_terminate=xa rollback |
| 41 |
--let $xa_prepare_opt=1 |
| 42 |
--source extra/rpl_tests/rpl_xa_mixed_engines.inc |
| 43 |
|
| 44 |
--source include/sync_slave_sql_with_master.inc |
| 45 |
--source include/rpl_connection_master.inc |
| 46 |
|
| 47 |
--echo === ROLLBACK with no PREPARE === |
| 48 |
|
| 49 |
--let $command=run |
| 50 |
--let $xa_terminate=xa rollback |
| 51 |
--let $xa_prepare_opt= |
| 52 |
--source extra/rpl_tests/rpl_xa_mixed_engines.inc |
| 53 |
--let $xa_rollback_only= |
| 54 |
|
| 55 |
--source include/sync_slave_sql_with_master.inc |
| 56 |
|
| 57 |
--let $diff_tables= master:tm, slave:tm |
| 58 |
--source include/diff_tables.inc |
| 59 |
|
| 60 |
# Cleanup |
| 61 |
|
| 62 |
--source include/rpl_connection_master.inc |
| 63 |
--let $command=cleanup |
| 64 |
--source extra/rpl_tests/rpl_xa_mixed_engines.inc |
| 65 |
|
| 66 |
--source include/sync_slave_sql_with_master.inc |
| 67 |
|
| 68 |
--source include/rpl_end.inc |