mirror of
https://github.com/MariaDB/server.git
synced 2025-12-06 05:42:06 +03:00
This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
88 lines
2.7 KiB
Plaintext
88 lines
2.7 KiB
Plaintext
# 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");
|
|
|
|
|
|
-- source include/have_log_bin.inc
|
|
RESET MASTER;
|
|
|
|
-- let $MYSQLD_DATADIR= `select @@datadir`
|
|
-- let $log_bin_index=`select substring_index(@@log_bin_index,'/',-1)`
|
|
-- let $log_bin_basename=`select substring_index(@@log_bin_basename,'/',-1)`
|
|
|
|
###############################################
|
|
# check hitting maximum file name extension:
|
|
###############################################
|
|
|
|
##########
|
|
# Prepare
|
|
##########
|
|
|
|
# 1. Stop master server
|
|
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
-- shutdown_server 10
|
|
-- source include/wait_until_disconnected.inc
|
|
|
|
# 2. Prepare log and index file
|
|
-- copy_file $MYSQLD_DATADIR/$log_bin_index $MYSQLD_DATADIR/$log_bin_index.orig
|
|
-- copy_file $MYSQLD_DATADIR/$log_bin_basename.000001 $MYSQLD_DATADIR/$log_bin_basename.2147483646
|
|
-- append_file $MYSQLD_DATADIR/$log_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
|
|
|
|
###########
|
|
# 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 10
|
|
-- source include/wait_until_disconnected.inc
|
|
|
|
# 2. Undo changes to index and log files
|
|
-- remove_file $MYSQLD_DATADIR/$log_bin_index
|
|
-- copy_file $MYSQLD_DATADIR/$log_bin_index.orig $MYSQLD_DATADIR/$log_bin_index
|
|
-- remove_file $MYSQLD_DATADIR/$log_bin_index.orig
|
|
|
|
-- remove_file $MYSQLD_DATADIR/$log_bin_basename.2147483646
|
|
-- remove_file $MYSQLD_DATADIR/$log_bin_basename.2147483647
|
|
|
|
# 3. Restart the server
|
|
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
-- enable_reconnect
|
|
-- source include/wait_until_connected_again.inc
|