1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-26 01:44:06 +03:00
Files
mariadb/mysql-test/t/rpl_max_binlog_size_func.test
Magnus Svensson 3d34d34c88 Merge 5.1->5.1-rpl
Fix paths and name of a few files to make it work with new mtr.pl
2008-05-30 11:12:07 +02:00

45 lines
1.3 KiB
Plaintext

source include/have_log_bin.inc;
###############################################################################
# Begin the functionality testing of max_binlog_size #
###############################################################################
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
#==============================================================
--echo '--- check if log file is rotated after 4096 bytes ----'
#==============================================================
SET @saved_max_binlog_size= @@global.max_binlog_size;
SET @@global.max_binlog_size = 4096;
CREATE TABLE t1(a CHAR(5));
# around 50 records are required to rotate bin log
let $a = 50;
--disable_query_log
while ($a){
INSERT INTO t1 VALUES ('mysql');
dec $a;
}
--enable_query_log
--sleep 2
# if log file is not created then this will fail
let $MYSQLD_DATADIR=`select @@datadir`;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
--file_exists $MYSQLD_DATADIR/mylog.000002
--echo 'mylog.000002 exists'
SET @@global.max_binlog_size= @saved_max_binlog_size;
DROP TABLE t1;
###############################################################################
# End of functionality testing for max_binlog_size #
###############################################################################