| 1 |
include/rpl_init.inc [topology=none] |
| 2 |
# |
| 3 |
# 1) Configuration |
| 4 |
# |
| 5 |
include/suppress_messages.inc |
| 6 |
# Connection 1 suppresses message <Found 2 prepared XA transactions>. |
| 7 |
# |
| 8 |
# 2) Create a table and prepare 2 XA transactions |
| 9 |
# |
| 10 |
CREATE TABLE t (a INT); |
| 11 |
XA START X'0011'; |
| 12 |
INSERT INTO t VALUES (1); |
| 13 |
XA END X'0011'; |
| 14 |
XA PREPARE X'0011'; |
| 15 |
XA START X'0022'; |
| 16 |
INSERT INTO t VALUES (2); |
| 17 |
XA END X'0022'; |
| 18 |
XA PREPARE X'0022'; |
| 19 |
# |
| 20 |
# 3) Restart the server |
| 21 |
# |
| 22 |
include/rpl_restart_server.inc [server_number=1] |
| 23 |
# |
| 24 |
# 4) Rollback the transaction to remove XID from prepared state. |
| 25 |
# |
| 26 |
XA rollback X'0011'; |
| 27 |
XA rollback X'0022'; |
| 28 |
# |
| 29 |
# 5) Cleanup |
| 30 |
# |
| 31 |
DROP TABLE t; |