mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
3357bc7ea3
Make ENGINE= an alias for TYPE= (Compabiltiy with 4.1) Fix when using symlinked data files and realpath() is not working client/mysqltest.c: Copied mysqltest from 4.1 and modified this to compile in 4.0 This was needed to get replace_columns to work. include/my_sys.h: Stop compiler warnings about alloca on freebsd myisam/mi_check.c: Fix when using symlinked data files and realpath() is not working mysql-test/r/handler.result: test engine= mysql-test/r/rpl_max_relay_size.result: Use replace_columns to replace some 'not constant' columns mysql-test/r/rpl_rotate_logs.result: Use replace_columns to replace some 'not constant' columns mysql-test/r/rpl_trunc_binlog.result: Use replace_columns to replace some 'not constant' columns mysql-test/t/handler.test: test engine= mysql-test/t/rpl_log_pos.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_max_relay_size.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_rotate_logs.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_trunc_binlog.test: Use replace_columns to replace some 'not constant' columns mysys/my_symlink.c: More debugging sql/lex.h: Make ENGINE= an alias for TYPE= sql/mysqld.cc: Code cleanup strings/strto.c: Fix for True64 strings/strtoll.c: Fix for True64 strings/strtoull.c: Remove not needed include file
93 lines
2.5 KiB
Text
93 lines
2.5 KiB
Text
# Test of options max_binlog_size and max_relay_log_size and
|
|
# how they act (if max_relay_log_size == 0, use max_binlog_size
|
|
# for relay logs too).
|
|
# Test of manual relay log rotation with FLUSH LOGS.
|
|
|
|
source include/master-slave.inc;
|
|
connection slave;
|
|
stop slave;
|
|
connection master;
|
|
# Generate a big enough master's binlog to cause relay log rotations
|
|
create table t1 (a int);
|
|
let $1=800;
|
|
disable_query_log;
|
|
begin;
|
|
while ($1)
|
|
{
|
|
# eval means expand $ expressions
|
|
eval insert into t1 values( $1 );
|
|
dec $1;
|
|
}
|
|
enable_query_log;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
reset slave;
|
|
set global max_binlog_size=8192;
|
|
set global max_relay_log_size=8192-1; # mapped to 4096
|
|
select @@global.max_relay_log_size;
|
|
start slave;
|
|
sync_with_master;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT 3334 MASTER_PORT
|
|
--replace_column 1 # 33 #
|
|
show slave status;
|
|
stop slave;
|
|
reset slave;
|
|
set global max_relay_log_size=(5*4096);
|
|
select @@global.max_relay_log_size;
|
|
start slave;
|
|
sync_with_master;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT 3334 MASTER_PORT
|
|
--replace_column 1 # 33 #
|
|
show slave status;
|
|
stop slave;
|
|
reset slave;
|
|
set global max_relay_log_size=0;
|
|
select @@global.max_relay_log_size;
|
|
start slave;
|
|
sync_with_master;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT 3334 MASTER_PORT
|
|
--replace_column 1 # 33 #
|
|
show slave status;
|
|
|
|
# Tests below are mainly to ensure that we have not coded with wrong assumptions
|
|
|
|
stop slave;
|
|
reset slave;
|
|
# test of relay log rotation when the slave is stopped
|
|
# (to make sure it does not crash).
|
|
flush logs;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT 3334 MASTER_PORT
|
|
--replace_column 1 # 33 #
|
|
show slave status;
|
|
|
|
reset slave;
|
|
start slave;
|
|
sync_with_master;
|
|
# test of relay log rotation when the slave is started
|
|
flush logs;
|
|
# We have now easy way to be sure that the SQL thread has now deleted the
|
|
# log we just closed. But a trick to achieve this is do an update on the master.
|
|
connection master;
|
|
create table t1 (a int);
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT 3334 MASTER_PORT
|
|
--replace_column 1 # 33 #
|
|
show slave status;
|
|
# one more rotation, to be sure Relay_Log_Space is correctly updated
|
|
flush logs;
|
|
connection master;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT 3334 MASTER_PORT
|
|
--replace_column 1 # 33 #
|
|
show slave status;
|
|
|
|
connection master;
|
|
# test that the absence of relay logs does not make a master crash
|
|
flush logs;
|
|
show master status;
|