mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-33582 Add more warnings to be able to better diagnose network issues
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>
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
source include/master-slave.inc;
|
||||
|
||||
--disable_query_log
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Could not read packet:.* errno: 11 ");
|
||||
# The following one comes from calling dirty_close on client side
|
||||
call mtr.add_suppression("Could not read packet:.* errno: 2 ");
|
||||
--enable_query_log
|
||||
|
||||
let $org_log_warnings=`select @@global.log_warnings`;
|
||||
|
||||
# Test extended warnings
|
||||
SET GLOBAL LOG_WARNINGS=4;
|
||||
|
||||
create table t1(n int);
|
||||
# Use of get_lock gives a warning for unsafeness if binlog_format=statement
|
||||
@@ -41,6 +51,10 @@ connection master1;
|
||||
drop table t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection default;
|
||||
--disable_query_log
|
||||
--eval SET GLOBAL LOG_WARNINGS=$org_log_warnings;
|
||||
--enable_query_log
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
||||
|
Reference in New Issue
Block a user