mariadb/mysql-test/r/xa_sync.result
Sergey Vojtovich 7ed673f35c MDEV-7793 - Race condition between XA COMMIT/ROLLBACK and disconnect
XA COMMIT/ROLLBACK of XA transaction owned by different thread may access
freed memory if that thread disconnects at the same time.

Also concurrent XA COMMIT/ROLLBACK of recovered XA transaction were not
serialized properly.
2015-05-07 16:48:30 +04:00

24 lines
739 B
Text

#
# MDEV-7793 - Race condition between XA COMMIT/ROLLBACK and disconnect
#
# Note that this test is meaningful only with valgrind.
XA START 'xatest';
XA END 'xatest';
XA PREPARE 'xatest';
SET debug_sync='xa_after_search SIGNAL parked WAIT_FOR go';
XA COMMIT 'xatest';
SET debug_sync='now WAIT_FOR parked';
# Waiting for thread to get deleted
SET debug_sync='now SIGNAL go';
ERROR XAE04: XAER_NOTA: Unknown XID
SET debug_sync='RESET';
XA START 'xatest';
XA END 'xatest';
XA PREPARE 'xatest';
SET debug_sync='xa_after_search SIGNAL parked WAIT_FOR go';
XA ROLLBACK 'xatest';
SET debug_sync='now WAIT_FOR parked';
# Waiting for thread to get deleted
SET debug_sync='now SIGNAL go';
ERROR XAE04: XAER_NOTA: Unknown XID
SET debug_sync='RESET';