|
| 1 | +CREATE TEMPORARY SEQUENCE seq_1; |
| 2 | +XA START '3'; |
| 3 | +CREATE TEMPORARY TABLE tmp_1(c INT); |
| 4 | +XA END '3'; |
| 5 | +XA PREPARE '3'; |
| 6 | +DROP TEMPORARY TABLE tmp_1; |
| 7 | +ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state |
| 8 | +ALTER TABLE tmp_1 DROP COLUMN c; |
| 9 | +ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state |
| 10 | +DROP TEMPORARY SEQUENCE seq_1; |
| 11 | +ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state |
| 12 | +ALTER SEQUENCE seq_1 INCREMENT BY 1; |
| 13 | +ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state |
| 14 | +CREATE TEMPORARY TABLE tmp_2(c INT); |
| 15 | +ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state |
| 16 | +CREATE TEMPORARY SEQUENCE seq_2; |
| 17 | +ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state |
| 18 | +XA ROLLBACK '3'; |
| 19 | +# Proof of correct logging incl empty XA-PREPARE |
| 20 | +include/show_binlog_events.inc |
| 21 | +Log_name Pos Event_type Server_id End_log_pos Info |
| 22 | +master-bin.000001 # Gtid # # GTID #-#-# |
| 23 | +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY SEQUENCE seq_1 |
| 24 | +master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
| 25 | +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp_1(c INT) |
| 26 | +master-bin.000001 # Query # # COMMIT |
| 27 | +master-bin.000001 # Gtid # # XA START X'33',X'',1 GTID #-#-# |
| 28 | +master-bin.000001 # Query # # XA END X'33',X'',1 |
| 29 | +master-bin.000001 # XA_prepare # # XA PREPARE X'33',X'',1 |
| 30 | +master-bin.000001 # Gtid # # GTID #-#-# |
| 31 | +master-bin.000001 # Query # # XA ROLLBACK X'33',X'',1 |
0 commit comments