Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/server/mysql/mysql-test/t/ |
Upload File : |
# This file contains XA-related test cases that requires mysql server # built with debug. -- source include/have_innodb.inc --source include/not_embedded.inc --source include/not_valgrind.inc --source include/have_debug.inc --disable_query_log call mtr.add_suppression("Found 1 prepared XA transactions"); --enable_query_log --echo # --echo # WL#7155: Test 1: check that prepared transaction branch --echo # is recovered after abnormal server termination. --echo # CREATE TABLE t1 (a INT) ENGINE=INNODB; XA START 'xid1'; INSERT INTO t1 VALUES (1); XA END 'xid1'; XA PREPARE 'xid1'; --disable_query_log set session debug="+d,crash_after_xa_recover"; --enable_query_log # Write file to make mysql-test-run.pl wait for the server to stop --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --error 2013 XA RECOVER; # Call script that will poll the server waiting for it to disappear --source include/wait_until_disconnected.inc --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/start_mysqld.inc --disable_query_log set session debug="-d,crash_after_xa_recover"; --enable_query_log XA RECOVER; SELECT * FROM t1; XA COMMIT 'xid1'; SELECT * FROM t1; DROP TABLE t1; --echo # --echo # WL#7155: Test 2: check that in case of abnormal server termination --echo # the changes done by unprepared transaction branch will be rolled back --echo # after the server restart. --echo # CREATE TABLE t1 (a INT) ENGINE=INNODB; XA START 'xid1'; INSERT INTO t1 VALUES (1); XA END 'xid1'; --disable_query_log set session debug="+d,crash_after_xa_recover"; --enable_query_log # Write file to make mysql-test-run.pl wait for the server to stop --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --error 2013 XA RECOVER; # Call script that will poll the server waiting for it to disappear --source include/wait_until_disconnected.inc --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/start_mysqld.inc --disable_query_log set session debug="-d,crash_after_xa_recover"; --enable_query_log XA RECOVER; SELECT * FROM t1; DROP TABLE t1; --echo # --echo # WL#7155: Test 3: Check that escaped "'" symbol for xid value --echo # is handled correctly during recovering XA transaction. --echo # CREATE TABLE t1 (a INT) ENGINE=INNODB; XA START 'xid1', 'br\'_1'; INSERT INTO t1 VALUES (1); XA END 'xid1', 'br\'_1'; XA PREPARE 'xid1', 'br\'_1'; --disable_query_log set session debug="+d,crash_after_xa_recover"; --enable_query_log # Write file to make mysql-test-run.pl wait for the server to stop --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --error 2013 XA RECOVER; # Call script that will poll the server waiting for it to disappear --source include/wait_until_disconnected.inc --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/start_mysqld.inc --disable_query_log set session debug="-d,crash_after_xa_recover"; --enable_query_log XA RECOVER; XA ROLLBACK 'xid1', 'br\'_1'; DROP TABLE t1; --echo # --echo # Bug#18068253 - XA START WITH THE EXIST XID, AND THEN XA COMMIT WITH THE XID WILL FAILED --echo # CREATE TABLE t1 (a INT) ENGINE=INNODB; XA START 'xid1'; INSERT INTO t1 VALUES (1); XA END 'xid1'; XA PREPARE 'xid1'; set session debug="+d,crash_after_xa_recover"; # Write file to make mysql-test-run.pl wait for the server to stop --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --error 2013 XA RECOVER; # Call script that will poll the server waiting for it to disappear --source include/wait_until_disconnected.inc --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/start_mysqld.inc set session debug="-d,crash_after_xa_recover"; XA RECOVER; --error ER_XAER_DUPID XA START 'xid1'; XA COMMIT 'xid1'; DROP TABLE t1; --echo # --echo # Bug#20538956 - XA PREPARE ERROR BRANCH LEAVES THE TRANSACTION IN SCREWED STATE --echo # --connect (con1, 127.0.0.1,root,,test,$MASTER_MYPORT,) CREATE TABLE t1 (a INT); XA START 'xid1'; INSERT INTO t1 VALUES (1); XA END 'xid1'; SET @@session.debug = '+d,simulate_xa_failure_prepare'; --error ER_XA_RBROLLBACK XA PREPARE 'xid1'; SET @@session.debug = '-d,simulate_xa_failure_prepare'; --error ER_XAER_NOTA XA ROLLBACK 'xid1'; # # The following query failed before patch applied. # XA START 'trx_another_one'; --disconnect con1 --connection default --echo # --echo # Bug#20488921 - ERROR PROPAGATION DOES NOT FULLY WORK IN XA --echo # XA START 'xid1'; INSERT INTO t1 VALUES (1); XA END 'xid1'; XA PREPARE 'xid1'; SET @@session.debug= '+d,simulate_xa_commit_log_failure'; --error ER_XAER_RMERR XA COMMIT 'xid1'; # Without a patch for the bug#20488921 execution of the following SET statement # led to an assert firing. SET @@session.debug= '-d,simulate_xa_commit_log_failure'; # The following statement is just to check that there isn't any XA transaction # independently from its state. INSERT INTO t1 VALUES (2); DROP TABLE t1; --echo # --echo # Bug#23264552 - XA: ASSERT `m_status == da_error' IN mysql_errno:sql_error.h:385 --echo # --connect (con1, 127.0.0.1,root,,test,$MASTER_MYPORT,) CREATE TABLE t1 (a INT); XA START 'xid1'; INSERT INTO t1 VALUES (1); XA END 'xid1'; SET @@session.debug = '+d,simulate_xa_failure_prepare_in_engine'; --error ER_XA_RBROLLBACK XA PREPARE 'xid1'; SET @@session.debug = '-d,simulate_xa_failure_prepare_in_engine'; --error ER_XAER_NOTA XA ROLLBACK 'xid1'; # # Check that subsequent XA transaction can be initiated. # XA START 'trx_another_one'; --disconnect con1 --source include/wait_until_disconnected.inc --connection default DROP TABLE t1;