Commit 3541bd63 authored by Monty's avatar Monty

MDEV-33582 Add more warnings to be able to better diagnose network issues

Changed the logged messages from errors to warnings
Also changed 'remain' to 'read_length' in the warning to make it more readable.
parent 6c2cd4cf
......@@ -2,6 +2,9 @@ include/master-slave.inc
[connection master]
connection master;
call mtr.add_suppression("Got an error reading communication packets");
call mtr.add_suppression("Got an error writing communication packets");
call mtr.add_suppression("Could not read packet");
call mtr.add_suppression("Could not write packet");
set @save_bgc_count= @@global.binlog_commit_wait_count;
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
set @save_debug_dbug= @@global.debug_dbug;
......
......@@ -26,6 +26,9 @@
--connection master
call mtr.add_suppression("Got an error reading communication packets");
call mtr.add_suppression("Got an error writing communication packets");
call mtr.add_suppression("Could not read packet");
call mtr.add_suppression("Could not write packet");
set @save_bgc_count= @@global.binlog_commit_wait_count;
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
set @save_debug_dbug= @@global.debug_dbug;
......
......@@ -778,13 +778,12 @@ net_real_write(NET *net,const uchar *packet, size_t len)
#ifdef MYSQL_SERVER
if (global_system_variables.log_warnings > 3)
{
my_printf_error(net->last_errno,
"Could not write packet: fd: %lld state: %d "
sql_print_warning("Could not write packet: fd: %lld state: %d "
"errno: %d vio_errno: %d length: %ld",
MYF(ME_ERROR_LOG),
MYF(ME_ERROR_LOG | ME_WARNING),
(longlong) vio_fd(net->vio), (int) net->vio->state,
vio_errno(net->vio), net->last_errno, (ulong) (end-pos));
break;
vio_errno(net->vio), net->last_errno,
(ulong) (end-pos));
}
#endif
MYSQL_SERVER_my_error(net->last_errno, MYF(0));
......@@ -1101,16 +1100,15 @@ my_real_read(NET *net, size_t *complen,
#ifdef MYSQL_SERVER
if (global_system_variables.log_warnings > 3)
{
my_printf_error(net->last_errno,
"Could not read packet: fd: %lld state: %d "
"remain: %u errno: %d vio_errno: %d "
/* Log things as a warning */
sql_print_warning("Could not read packet: fd: %lld state: %d "
"read_length: %u errno: %d vio_errno: %d "
"length: %lld",
MYF(ME_ERROR_LOG),
(longlong) vio_fd(net->vio), (int) net->vio->state,
(longlong) vio_fd(net->vio),
(int) net->vio->state,
remain, vio_errno(net->vio), net->last_errno,
(longlong) length);
}
else
my_error(net->last_errno, MYF(0));
#endif /* MYSQL_SERVER */
goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment