2015-03-17 19:49:04 +04:00
|
|
|
#
|
|
|
|
# MDEV-7793 - Race condition between XA COMMIT/ROLLBACK and disconnect
|
|
|
|
#
|
|
|
|
# Note that this test is meaningful only with valgrind.
|
2016-03-25 20:51:22 +04:00
|
|
|
connect con1, localhost, root;
|
|
|
|
connect con2, localhost, root;
|
|
|
|
connection con1;
|
2015-03-17 19:49:04 +04:00
|
|
|
XA START 'xatest';
|
|
|
|
XA END 'xatest';
|
|
|
|
XA PREPARE 'xatest';
|
2016-03-25 20:51:22 +04:00
|
|
|
connection con2;
|
2015-03-17 19:49:04 +04:00
|
|
|
SET debug_sync='xa_after_search SIGNAL parked WAIT_FOR go';
|
|
|
|
XA COMMIT 'xatest';
|
2016-03-25 20:51:22 +04:00
|
|
|
connection default;
|
2015-03-17 19:49:04 +04:00
|
|
|
SET debug_sync='now WAIT_FOR parked';
|
2016-03-25 20:51:22 +04:00
|
|
|
disconnect con1;
|
2015-03-17 19:49:04 +04:00
|
|
|
# Waiting for thread to get deleted
|
|
|
|
SET debug_sync='now SIGNAL go';
|
2016-03-25 20:51:22 +04:00
|
|
|
connection con2;
|
2015-03-17 19:49:04 +04:00
|
|
|
ERROR XAE04: XAER_NOTA: Unknown XID
|
2016-03-25 20:51:22 +04:00
|
|
|
disconnect con2;
|
|
|
|
connection default;
|
2015-03-17 19:49:04 +04:00
|
|
|
SET debug_sync='RESET';
|
2016-03-25 20:51:22 +04:00
|
|
|
connect con1, localhost, root;
|
|
|
|
connect con2, localhost, root;
|
|
|
|
connection con1;
|
2015-03-17 19:49:04 +04:00
|
|
|
XA START 'xatest';
|
|
|
|
XA END 'xatest';
|
|
|
|
XA PREPARE 'xatest';
|
2016-03-25 20:51:22 +04:00
|
|
|
connection con2;
|
2015-03-17 19:49:04 +04:00
|
|
|
SET debug_sync='xa_after_search SIGNAL parked WAIT_FOR go';
|
|
|
|
XA ROLLBACK 'xatest';
|
2016-03-25 20:51:22 +04:00
|
|
|
connection default;
|
2015-03-17 19:49:04 +04:00
|
|
|
SET debug_sync='now WAIT_FOR parked';
|
2016-03-25 20:51:22 +04:00
|
|
|
disconnect con1;
|
2015-03-17 19:49:04 +04:00
|
|
|
# Waiting for thread to get deleted
|
|
|
|
SET debug_sync='now SIGNAL go';
|
2016-03-25 20:51:22 +04:00
|
|
|
connection con2;
|
2015-03-17 19:49:04 +04:00
|
|
|
ERROR XAE04: XAER_NOTA: Unknown XID
|
2016-03-25 20:51:22 +04:00
|
|
|
disconnect con2;
|
|
|
|
connection default;
|
2015-03-17 19:49:04 +04:00
|
|
|
SET debug_sync='RESET';
|