403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.69.176.166
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 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 : ON
Directory :  /www/server/mysql/mysql-test/suite/binlog/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/binlog/t/binlog_xa_select_gtid_executed_explicitly_crash.test
# ==== Purpose ====
#
# If a server is crashed after preparing a XA transaction and right before
# committing the XA transaction, which is used to select from the system
# gtid_executed table explicitly by users, verify that the following
# recovery is not aborting due to an innodb_lock_wait_timeout error
# when it is reading the system gtid_executed table.
#
# ==== Implementation ====
#
#  - Start a XA transaction and select from the mysql.gtid_executed
#    table explicitly.
#  - Check the ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE error is not caused.
#  - Crash the server after preparing a XA transaction and right before
#    committing the XA transaction.
#  - Verify that the following recovery is not aborting due to an
#    innodb_lock_wait_timeout error when it is reading the system
#    gtid_executed table.
#
# ==== References ====
#
# Bug#21452916  SILENT FAILURE TO START IF MYSQL.GTIDS_EXECUTED GETS HA_ERR_LOCK_WAIT_TIMEOUT
#

# Make sure the test is repeatable
--source include/force_restart.inc
--source include/not_valgrind.inc
--source include/have_binlog_format_row.inc
--source include/have_debug.inc
--source include/have_gtid.inc

call mtr.add_suppression("Found 1 prepared XA transactions");

# For reseting mysql.gtid_executed table
RESET MASTER;

--let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID`

CREATE TABLE t1 (a INT) ENGINE=InnoDB;

FLUSH LOGS;
--echo #
--echo # Verify that selecting from mysql.gtid_executed table
--echo # explicitly by a XA transaction does not cause an error.
--echo #
XA START '1';
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
--replace_result $master_uuid MASTER_UUID
SELECT * FROM mysql.gtid_executed;
XA END '1';
XA PREPARE '1';

--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--echo #
--echo # Crash the server after preparing a XA transaction
--echo # and right before committing the XA transaction
--echo #
SET @@SESSION.DEBUG= '+d, simulate_crash_on_commit_xa_trx';
# Run the crashing query with the CR_SERVER_LOST error
--error 2013
XA COMMIT '1';

--echo #
--echo # Verify that the following recovery is not aborting due to an
--echo # innodb_lock_wait_timeout error when it is reading the system
--echo # gtid_executed table.
--echo #
--source include/wait_until_disconnected.inc
--enable_reconnect
--echo # Restart the master server
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
--disable_reconnect

DROP TABLE t1;

Youez - 2016 - github.com/yon3zu
LinuXploit