mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
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.
This commit is contained in:
@@ -2,6 +2,9 @@ include/master-slave.inc
|
|||||||
[connection master]
|
[connection master]
|
||||||
connection master;
|
connection master;
|
||||||
call mtr.add_suppression("Got an error reading communication packets");
|
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_count= @@global.binlog_commit_wait_count;
|
||||||
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
|
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
|
||||||
set @save_debug_dbug= @@global.debug_dbug;
|
set @save_debug_dbug= @@global.debug_dbug;
|
||||||
|
|||||||
@@ -26,6 +26,9 @@
|
|||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
call mtr.add_suppression("Got an error reading communication packets");
|
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_count= @@global.binlog_commit_wait_count;
|
||||||
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
|
set @save_bgc_usec= @@global.binlog_commit_wait_usec;
|
||||||
set @save_debug_dbug= @@global.debug_dbug;
|
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
|
#ifdef MYSQL_SERVER
|
||||||
if (global_system_variables.log_warnings > 3)
|
if (global_system_variables.log_warnings > 3)
|
||||||
{
|
{
|
||||||
my_printf_error(net->last_errno,
|
sql_print_warning("Could not write packet: fd: %lld state: %d "
|
||||||
"Could not write packet: fd: %lld state: %d "
|
|
||||||
"errno: %d vio_errno: %d length: %ld",
|
"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,
|
(longlong) vio_fd(net->vio), (int) net->vio->state,
|
||||||
vio_errno(net->vio), net->last_errno, (ulong) (end-pos));
|
vio_errno(net->vio), net->last_errno,
|
||||||
break;
|
(ulong) (end-pos));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
MYSQL_SERVER_my_error(net->last_errno, MYF(0));
|
MYSQL_SERVER_my_error(net->last_errno, MYF(0));
|
||||||
@@ -1101,16 +1100,15 @@ retry:
|
|||||||
#ifdef MYSQL_SERVER
|
#ifdef MYSQL_SERVER
|
||||||
if (global_system_variables.log_warnings > 3)
|
if (global_system_variables.log_warnings > 3)
|
||||||
{
|
{
|
||||||
my_printf_error(net->last_errno,
|
/* Log things as a warning */
|
||||||
"Could not read packet: fd: %lld state: %d "
|
sql_print_warning("Could not read packet: fd: %lld state: %d "
|
||||||
"remain: %u errno: %d vio_errno: %d "
|
"read_length: %u errno: %d vio_errno: %d "
|
||||||
"length: %lld",
|
"length: %lld",
|
||||||
MYF(ME_ERROR_LOG),
|
(longlong) vio_fd(net->vio),
|
||||||
(longlong) vio_fd(net->vio), (int) net->vio->state,
|
(int) net->vio->state,
|
||||||
remain, vio_errno(net->vio), net->last_errno,
|
remain, vio_errno(net->vio), net->last_errno,
|
||||||
(longlong) length);
|
(longlong) length);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
my_error(net->last_errno, MYF(0));
|
my_error(net->last_errno, MYF(0));
|
||||||
#endif /* MYSQL_SERVER */
|
#endif /* MYSQL_SERVER */
|
||||||
goto end;
|
goto end;
|
||||||
|
|||||||
Reference in New Issue
Block a user