Debian Codegraph @

mysql-test/suite/sys_vars/t/rpl_max_binlog_size_func.test

raw
1 source include/have_log_bin.inc;
2
3 ###############################################################################
4 # Begin the functionality testing of max_binlog_size #
5 ###############################################################################
6 --disable_warnings
7 DROP TABLE IF EXISTS t1;
8 --enable_warnings
9
10 #==============================================================
11 --echo '--- check if log file is rotated after 4096 bytes ----'
12 #==============================================================
13
14 SET @saved_max_binlog_size= @@global.max_binlog_size;
15 SET @@global.max_binlog_size = 4096;
16 CREATE TABLE t1(a CHAR(5));
17
18 # around 50 records are required to rotate bin log
19 let $a = 50;
20 --disable_query_log
21 while ($a){
22 INSERT INTO t1 VALUES ('mysql');
23 dec $a;
24 }
25 --enable_query_log
26 SELECT COUNT(*) FROM t1;
27
28 # if log file is not created then this will fail
29 let $MYSQLD_DATADIR=`select @@datadir`;
30 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
31 --file_exists $MYSQLD_DATADIR/mylog.000002
32
33 --echo 'mylog.000002 exists'
34
35 SET @@global.max_binlog_size= @saved_max_binlog_size;
36
37 DROP TABLE t1;
38
39 ###############################################################################
40 # End of functionality testing for max_binlog_size #
41 ###############################################################################
42