mirror of
https://github.com/MariaDB/server.git
synced 2025-02-15 09:55:33 +01:00
![Monty](/assets/img/avatar_default.png)
Warnings are added to net_server.cc when global_system_variables.log_warnings >= 4. When the above condition holds then: - All communication errors from net_serv.cc is also written to the error log. - In case of a of not being able to read or write a packet, a more detailed error is given. Other things: - Added detection of slaves that has hangup to Ack_receiver::run() - vio_close() is now first marking the socket closed before closing it. The reason for this is to ensure that the connection that gets a read error can check if the reason was that the socket was closed. - Add a new state to vio to be able to detect if vio is acive, shutdown or closed. This is used to detect if socket is closed by another thread. - Testing of the new warnings is done in rpl_get_lock.test - Suppress some of the new warnings in mtr to allow one to run some of the tests with -mysqld=--log-warnings=4. All test in the 'rpl' suite can now be run with this option. - Ensure that global.log_warnings are restored at test end in a way that allows one to use mtr --mysqld=--log-warnings=4. Reviewed-by: <serg@mariadb.org>,<brandon.nesterenko@mariadb.com>
57 lines
1.4 KiB
Text
57 lines
1.4 KiB
Text
# Testing master to slave heartbeat protocol, test cases that need debug build.
|
|
|
|
--source include/have_debug.inc
|
|
--source include/master-slave.inc
|
|
|
|
--disable_query_log
|
|
CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
|
|
CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
|
call mtr.add_suppression("Could not read packet:.* errno: 11");
|
|
--enable_query_log
|
|
|
|
connection slave;
|
|
--source include/stop_slave.inc
|
|
set @restore_slave_net_timeout= @@global.slave_net_timeout;
|
|
--disable_warnings
|
|
set @@global.slave_net_timeout= 10;
|
|
--enable_warnings
|
|
|
|
###
|
|
### Checking the range
|
|
###
|
|
|
|
|
|
# default period slave_net_timeout/2
|
|
#
|
|
--query_vertical show status like 'Slave_heartbeat_period';
|
|
SET @saved_dbug= @@GLOBAL.debug_dbug;
|
|
SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
|
|
|
|
--source include/start_slave.inc
|
|
|
|
|
|
connection master;
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
CREATE TABLE t1 (a INT PRIMARY KEY);
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
sync_slave_with_master;
|
|
|
|
--connection slave
|
|
SELECT * FROM t1;
|
|
|
|
connection master;
|
|
drop table t1;
|
|
|
|
connection slave;
|
|
--source include/stop_slave.inc
|
|
--disable_warnings
|
|
SET GLOBAL debug_dbug=@saved_dbug;
|
|
set @@global.slave_net_timeout= @restore_slave_net_timeout;
|
|
--enable_warnings
|
|
--source include/start_slave.inc
|
|
|
|
--source include/rpl_end.inc
|