403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.68.242.42
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/rpl/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/rpl/t/rpl_gtid_mysqlbinlog_rotate.test
################################################################################
# BUG#20980932 MYSQLBINLOG GENERATES 'ROLLBACK' AFTER FD EVENT CAUSING 1782
#              ERRRO
#
# mysqlbinlog prints "ROLLBACK" at the end of binlog file. The ROLLBACK
# caused the error that "@@SESSION.GTID_NEXT cannot be set to ANONYMOUS
# when @@GLOBAL.GTID_MODE = ON."
#
# It happened in below two cases:
# - Case1. Binlog file doesn't include any data related events.
#  e.g. The binlog only includes:
#  Format_description_log_event
#  Rotate_log_event
#
#  and mysqlbinlog output:
#  BINLOG '... the binary of Format_description_log_event ...'
#  ROLLBACK
#
# - Case2. Relay log file includes a Format_description_log_event of master
#   which is generated at starting server.
#   e.g. the relay log includes:
#   Format_description_log_event of relay log
#   Format_description_log_event of master(generated when starting server)
#
#   and mysqlbinlog output:
#   BINLOG '... the binary of relay log's Format_description_log_event'
#   ROLLBACK
#   BINLOG '... the binary of master's Format_description_log_event'
#
#   To fix it:
#   - ROLLBACK is not printed if there is no uncomplete transaction at the end
#     of a binlog.
#   - Format_description_log_event of relay log is not output as a 'BINLOG'.
#   - SET @@SESSION.GTID_NEXT = 'AUTOMATIC' is always printed out at the end of
#     a binlog. It is after the 'ROLLBACK' if the last transaction is
#     uncomplete.
#
#  This test verify above two cases work well.
################################################################################
--source include/have_gtid.inc
--source include/have_binlog_format_row.inc

--echo #
--echo # Verify Case2 works well
--echo #
--source include/master-slave.inc
--let $master_file1 = query_get_value(SHOW MASTER STATUS, File, 1)
--let $MASTER_DATADIR=`select @@datadir`

--source include/rpl_connection_slave.inc

--let $SLAVE_DATADIR=`select @@datadir`
--let $relay_file1 = query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)

--exec $MYSQL_BINLOG --force-if-open $SLAVE_DATADIR/$relay_file1 | $MYSQL -uroot -S$MASTER_MYSOCK
--exec $MYSQL_BINLOG --force-if-open $SLAVE_DATADIR/$relay_file1 | $MYSQL -uroot -S$SLAVE_MYSOCK

--echo #
--echo # Verify Case1 works well
--echo #
--source include/rpl_connection_master.inc
FLUSH BINARY LOGS;

--let $master_file2 = query_get_value(SHOW MASTER STATUS, File, 1)

--exec $MYSQL_BINLOG --force-if-open $MASTER_DATADIR/$master_file1 $MASTER_DATADIR/$master_file2 | $MYSQL -uroot -S$SLAVE_MYSOCK

--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit