403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.88.81
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_max_extension.test
#  BUG#40611: MySQL cannot make a binary log after sequential number beyond 
#             unsigned long.
# 
#  Problem statement
#  =================
#
#    Extension for log file names might be created with negative 
#    numbers (when counter used would wrap around), causing server 
#    failure when incrementing -00001 (reaching number 000000 
#    extension).
#
#  Test
#  ====
#    This tests aims at testing the a patch that removes negatives 
#    numbers from log name extensions and checks that the server 
#    reports gracefully that the limit has been reached.
#
#    It instruments index file to point to a log file close to
#    the new maximum and calls flush logs to get warning.
#

call mtr.add_suppression("Next log extension: 2147483647. Remaining log filename extensions: 0.");
call mtr.add_suppression("Log filename extension number exhausted:");
call mtr.add_suppression("Can't generate a unique log-filename");
call mtr.add_suppression("Could not open .*");
-- source include/have_log_bin.inc
RESET MASTER;

-- let $MYSQLD_DATADIR= `select @@datadir`

###############################################
# check hitting maximum file name extension:
###############################################

##########
# Prepare
##########

# 1. Stop master server
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- shutdown_server 
-- source include/wait_until_disconnected.inc

# 2. Prepare log and index file
-- copy_file $MYSQLD_DATADIR/master-bin.index $MYSQLD_DATADIR/master-bin.index.orig
-- copy_file $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.2147483646
-- append_file $MYSQLD_DATADIR/master-bin.index
master-bin.2147483646
EOF

# 3. Restart the server
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- enable_reconnect
-- source include/wait_until_connected_again.inc
SET GLOBAL binlog_error_action= IGNORE_ERROR;
###########
# Assertion
###########

# assertion: should raise error
-- error ER_NO_UNIQUE_LOGFILE
FLUSH LOGS;

##############
# Clean up
##############

# 1. Stop the server
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- shutdown_server 
-- source include/wait_until_disconnected.inc

# 2. Undo changes to index and log files
-- remove_file $MYSQLD_DATADIR/master-bin.index
-- copy_file $MYSQLD_DATADIR/master-bin.index.orig $MYSQLD_DATADIR/master-bin.index
-- remove_file $MYSQLD_DATADIR/master-bin.index.orig

-- remove_file $MYSQLD_DATADIR/master-bin.2147483646
-- remove_file $MYSQLD_DATADIR/master-bin.2147483647

# 3. Restart the server
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- enable_reconnect
-- source include/wait_until_connected_again.inc

Youez - 2016 - github.com/yon3zu
LinuXploit