mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
8b8647ff42
mysql-test/r/init_connect.result: Restore global variable to the value it's set to when server is started mysql-test/r/key_cache.result: Restore global variable values to original mysql-test/r/mysqldump.result: Drop the user that was created. Specifying "drop user myDB_user" is equal to "drop user myDB_user@%" mysql-test/r/rpl_deadlock.result: Restore global variable values to original mysql-test/r/rpl_drop_db.result: Remove the conflicting file and drop database mysqltest1 before test exits mysql-test/r/rpl_ignore_revoke.result: As changes to mysql.* are ignored - explicitly delete the user on slave mysql-test/r/rpl_init_slave.result: Restore global variable values to original mysql-test/r/rpl_max_relay_size.result: Restore global variable values to original mysql-test/r/rpl_sp.result: Restore global variable values to original mysql-test/r/rpl_timezone.result: Restore global variable values to original mysql-test/r/rpl_variables.result: Restore global variable values to original mysql-test/r/view_grant.result: Use same user in all places in the same test "readonly" is equal to "readonly@%" not "readonly@localhost" mysql-test/t/init_connect.test: Restore global variable to the value it's set to when server is started mysql-test/t/key_cache.test: Restore global variable values to original mysql-test/t/mysqldump.test: Drop the user that was created. Specifying "drop user myDB_user" is equal to "drop user myDB_user@%" mysql-test/t/rpl_deadlock.test: Restore global variable values to original mysql-test/t/rpl_drop_db.test: Remove the conflicting file and drop database mysqltest1 before test exits mysql-test/t/rpl_ignore_revoke.test: As changes to mysql.* are ignored - explicitly delete the user on slave mysql-test/t/rpl_init_slave.test: Restore global variable values to original mysql-test/t/rpl_max_relay_size.test: Restore global variable values to original mysql-test/t/rpl_sp.test: Restore global variable values to original mysql-test/t/rpl_timezone.test: Restore global variable values to original mysql-test/t/rpl_variables.test: Restore global variable values to original mysql-test/t/view_grant.test: Use same user in all places in the same test "readonly" is equal to "readonly@%" not "readonly@localhost"
273 lines
5.4 KiB
Text
273 lines
5.4 KiB
Text
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
stop slave;
|
|
#
|
|
# Generate a big enough master's binlog to cause relay log rotations
|
|
#
|
|
create table t1 (a int);
|
|
drop table t1;
|
|
reset slave;
|
|
#
|
|
# Test 1
|
|
#
|
|
set @my_max_binlog_size= @@global.max_binlog_size;
|
|
set global max_binlog_size=8192;
|
|
set global max_relay_log_size=8192-1;
|
|
select @@global.max_relay_log_size;
|
|
@@global.max_relay_log_size
|
|
4096
|
|
start slave;
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_PORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 72952
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running Yes
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 72952
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
#
|
|
# Test 2
|
|
#
|
|
stop slave;
|
|
reset slave;
|
|
set global max_relay_log_size=(5*4096);
|
|
select @@global.max_relay_log_size;
|
|
@@global.max_relay_log_size 20480
|
|
start slave;
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_PORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 72952
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running Yes
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 72952
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
#
|
|
# Test 3: max_relay_log_size = 0
|
|
#
|
|
stop slave;
|
|
reset slave;
|
|
set global max_relay_log_size=0;
|
|
select @@global.max_relay_log_size;
|
|
@@global.max_relay_log_size 0
|
|
start slave;
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_PORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 72952
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running Yes
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 72952
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
#
|
|
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
|
#
|
|
stop slave;
|
|
reset slave;
|
|
flush logs;
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_PORT
|
|
Connect_Retry 1
|
|
Master_Log_File
|
|
Read_Master_Log_Pos 4
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File
|
|
Slave_IO_Running No
|
|
Slave_SQL_Running No
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 0
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
#
|
|
# Test 5
|
|
#
|
|
reset slave;
|
|
start slave;
|
|
flush logs;
|
|
create table t1 (a int);
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_PORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 73038
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running Yes
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 73038
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
#
|
|
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
|
#
|
|
flush logs;
|
|
drop table t1;
|
|
show slave status;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_PORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 73114
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running Yes
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 73114
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
flush logs;
|
|
show master status;
|
|
File master-bin.000002
|
|
Position 98
|
|
Binlog_Do_DB
|
|
Binlog_Ignore_DB
|
|
set global max_binlog_size= @my_max_binlog_size;
|
|
#
|
|
# End of 4.1 tests
|
|
#
|