diff options
author | Michael Widenius <monty@mariadb.org> | 2018-03-09 14:05:35 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-03-29 13:59:44 +0300 |
commit | a7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch) | |
tree | 70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/xa_sync.test | |
parent | ab1941266c59a19703a74b5593cf3f508a5752d7 (diff) | |
download | mariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz |
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/xa_sync.test')
-rw-r--r-- | mysql-test/main/xa_sync.test | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/main/xa_sync.test b/mysql-test/main/xa_sync.test new file mode 100644 index 00000000000..bb95af7c0ba --- /dev/null +++ b/mysql-test/main/xa_sync.test @@ -0,0 +1,45 @@ +--source include/have_debug_sync.inc + +--echo # +--echo # MDEV-7793 - Race condition between XA COMMIT/ROLLBACK and disconnect +--echo # +--echo # Note that this test is meaningful only with valgrind. +let $op= XA COMMIT 'xatest'; +let $i= 2; +while ($i) +{ + connect con1, localhost, root; + connect con2, localhost, root; + + connection con1; + XA START 'xatest'; + XA END 'xatest'; + XA PREPARE 'xatest'; + + connection con2; + SET debug_sync='xa_after_search SIGNAL parked WAIT_FOR go'; + send_eval $op; + + connection default; + SET debug_sync='now WAIT_FOR parked'; + disconnect con1; + disable_query_log; + echo # Waiting for thread to get deleted; + while (`SELECT count(*)!=2 FROM INFORMATION_SCHEMA.PROCESSLIST`) + { + real_sleep 0.1; + } + enable_query_log; + SET debug_sync='now SIGNAL go'; + + connection con2; + --error ER_XAER_NOTA + reap; + disconnect con2; + + connection default; + SET debug_sync='RESET'; + + let $op= XA ROLLBACK 'xatest'; + dec $i; +} |