summaryrefslogtreecommitdiff
path: root/mysql-test/suite/binlog/t/binlog_max_extension.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/binlog/t/binlog_max_extension.test')
-rw-r--r--mysql-test/suite/binlog/t/binlog_max_extension.test18
1 files changed, 10 insertions, 8 deletions
diff --git a/mysql-test/suite/binlog/t/binlog_max_extension.test b/mysql-test/suite/binlog/t/binlog_max_extension.test
index ba3ea435452..199a31ea05c 100644
--- a/mysql-test/suite/binlog/t/binlog_max_extension.test
+++ b/mysql-test/suite/binlog/t/binlog_max_extension.test
@@ -28,6 +28,8 @@ call mtr.add_suppression("Can't generate a unique log-filename");
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:
@@ -43,9 +45,9 @@ RESET MASTER;
-- source include/wait_until_disconnected.inc
# 2. Prepare log and index file
--- copy_file $MYSQLD_DATADIR/mysqld-bin.index $MYSQLD_DATADIR/mysqld-bin.index.orig
--- copy_file $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.2147483646
--- append_file $MYSQLD_DATADIR/mysqld-bin.index
+-- 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
@@ -72,12 +74,12 @@ FLUSH LOGS;
-- source include/wait_until_disconnected.inc
# 2. Undo changes to index and log files
--- remove_file $MYSQLD_DATADIR/mysqld-bin.index
--- copy_file $MYSQLD_DATADIR/mysqld-bin.index.orig $MYSQLD_DATADIR/mysqld-bin.index
--- remove_file $MYSQLD_DATADIR/mysqld-bin.index.orig
+-- 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/master-bin.2147483646
--- remove_file $MYSQLD_DATADIR/master-bin.2147483647
+-- 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