mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
7ed673f35c
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.
24 lines
739 B
Text
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';
|