403Webshell
Server IP : 104.21.38.3  /  Your IP : 104.23.175.10
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/src/mysql-test/suite/binlog/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/binlog/t/binlog_gtids_table_gcov.test
#
# ==== Purpose ====
#
# WL#6559 Optimize GTIDs for passive slave - store GTIDs in table
#
# Added test cases to cover error branches.
#
# Test case 1: Simulate an error on writing gtids into table on
#              server shutdown, verify that we can get correct
#              gtid sets after server restarts.
# Test case 2: Simulate an error on writing gtids into table on
#              binlog rotation, verify that GTIDs are not saved
#              into gtid_executed table.
#

--source include/not_valgrind.inc
--source include/have_debug.inc
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/have_gtid.inc

# Need to restart servers after this test because it closes the binary
# log and there is no other way to recover from that.
--source include/force_restart.inc

RESET MASTER;

call mtr.add_suppression("Failed to save the set of Global Transaction "
                         "Identifiers of the last binary log into the "
                         "mysql.gtid_executed table while the server was "
                         "shutting down. The next server restart will make "
                         "another attempt to save Global Transaction "
                         "Identifiers into the table.");
SET @debug_save= @@GLOBAL.DEBUG;
--let $saved_binlog_error_action=`SELECT @@GLOBAL.binlog_error_action`
--let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID`
CREATE TABLE t1 (a INT) ENGINE=InnoDB;

SET @@GLOBAL.DEBUG= "+d,simulate_err_on_write_gtid_into_table";
--source include/restart_mysqld.inc

--echo #
--echo # Verify that we can get correct gtid sets after server restarts
--echo # even if we encounter an error on writing gtids into table on
--echo # server shutdown.
--echo #
--let $assert_text= committed gtid set is MASTER_UUID:1-2
--let $assert_cond= @@GLOBAL.GTID_EXECUTED = "$master_uuid:1-2"
--source include/assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT * FROM mysql.gtid_executed;
SET GLOBAL DEBUG= @debug_save;
SET GLOBAL binlog_error_action= IGNORE_ERROR;

call mtr.add_suppression(".* Turning logging off for the whole duration of the "
                         "MySQL server process. To turn it on again: fix the "
                         "cause, shutdown the MySQL server and restart it.");
INSERT INTO t1 VALUES(1);
SET SESSION debug="+d,simulate_err_on_write_gtid_into_table";
--ERROR ER_GET_ERRNO
FLUSH LOGS;
SET SESSION debug="-d,simulate_err_on_write_gtid_into_table";
--echo #
--echo # Verify that GTIDs are not saved into gtid_executed table if we
--echo # encounter an error on writing gtids into table on binlog rotation.
--echo #
--replace_result $master_uuid MASTER_UUID
SELECT * FROM mysql.gtid_executed;
--let $assert_text= committed gtid set is MASTER_UUID:1-4
--let $assert_cond= @@GLOBAL.GTID_EXECUTED = "$master_uuid:1-4"
--source include/assert.inc
--eval SET GLOBAL binlog_error_action= $saved_binlog_error_action

DROP TABLE t1;

Youez - 2016 - github.com/yon3zu
LinuXploit