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/extra/rpl_tests/ |
Upload File : |
# # Create XA transaction to conclude it with COMMIT or ROLLBACK. # For either logging phase preceed it with supplied value of GTID_NEXT. # # param $conclude_as Commit or Rollback # param $gtid_phase1 GTID_NEXT value for the prepared round # param $gtid_phase2 GTID_NEXT value for the conclusion round # param $conn_external [master] connection to return control too # and randomly run conclusive query # param $xa_table [t1] Table to operate on in transaction # param $xa_error_simul Provoke a failure to set GTID_NEXT correctly. # When the first phase is not AUTOMATIC the 2nd # must be preceeded with a proper GTID_NEXT. # When the value is true, $disconnect_prepare is # to be false. # --let $xid = 'xid_1' --let $disconnect_prepare = 0 if (`SELECT concat('a','$conn_external') = 'a'`) { --let $conn_external = master } if (`SELECT concat('a','$gtid_phase1') = 'a'`) { --let $gtid_phase1 = automatic } if (`SELECT concat('a','$gtid_phase2') = 'a'`) { --let $gtid_phase2 = automatic } if (`SELECT concat('a','$xa_table') = 'a'`) { --let $xa_table = t1 } if (`SELECT concat('a','$xa_error_simul') = 'a'`) { --let $xa_error_simul = 0 } if (!$xa_error_simul) { --let $disconnect_prepare = `SELECT floor(rand()*10)%2` } --connection $conn_external --connect (xa_conn, 127.0.0.1,root,,test,$MASTER_MYPORT,) --let $conn_id = `SELECT connection_id()` --replace_result $master_uuid MASTER_UUID --eval SET @@SESSION.GTID_NEXT = '$gtid_phase1' --eval XA START $xid --disable_warnings --eval INSERT INTO $xa_table VALUES(1) --enable_warnings --eval XA END $xid --eval XA PREPARE $xid if ($disconnect_prepare) { --disconnect xa_conn --connection $conn_external --let $wait_condition= SELECT count(*) = 0 FROM performance_schema.threads WHERE PROCESSLIST_ID = $conn_id and type = 'FOREGROUND' --source include/wait_condition.inc } if (`SELECT NOT $disconnect_prepare AND $xa_error_simul AND '$gtid_phase1' <> 'automatic'`) { --replace_result $master_uuid MASTER_UUID --error ER_GTID_NEXT_TYPE_UNDEFINED_GROUP --eval XA $conclude_as $xid } --replace_result $master_uuid MASTER_UUID --eval SET @@SESSION.GTID_NEXT = '$gtid_phase2' --eval XA $conclude_as $xid if (!$disconnect_prepare) { --disconnect xa_conn } --connection $conn_external SET @@SESSION.GTID_NEXT = 'automatic';