############################################################################### # === Purpose === # # The purpose of this test is to recover XA transactions with XIDs containing null bytes. # # === Requirements === # # A binary log containing 2 XA PREPARE transactions in sequence with different XIDs containing null # bytes does not fail on recovery. # # === Implementation === # # 1) Configuration # 2) Create a table and prepare 2 XA transactions # 3) Restart the server # 4) Rollback the transaction to remove XID from prepared state. # 5) Cleanup # # === Reference === # # Bug#34918985 : Can't recover XA transactions with XIDs containing null bytes # ############################################################################### --source include/have_log_bin.inc --source include/have_binlog_format_row.inc --let $rpl_extra_connections_per_server= 1 --let $rpl_topology= none --let $rpl_server_count= 1 --source include/rpl_init.inc --echo # --echo # 1) Configuration --echo # --let $messages=Found 2 prepared XA transactions --source include/suppress_messages.inc --let $xid1=X'0011' --let $xid2=X'0022' --echo # --echo # 2) Create a table and prepare 2 XA transactions --echo # CREATE TABLE t (a INT); eval XA START $xid1; INSERT INTO t VALUES (1); eval XA END $xid1; eval XA PREPARE $xid1; eval XA START $xid2; INSERT INTO t VALUES (2); eval XA END $xid2; eval XA PREPARE $xid2; --echo # --echo # 3) Restart the server --echo # --let $rpl_server_number = 1 --let $rpl_force_stop = 1 #Test requirement is validated when rpl_restart_server.inc does not fail --source include/rpl_restart_server.inc --echo # --echo # 4) Rollback the transaction to remove XID from prepared state. --echo # eval XA rollback $xid1; eval XA rollback $xid2; --echo # --echo # 5) Cleanup --echo # DROP TABLE t;