mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Added more information to errors reported by report_reply_packet()
In particular ""Read semi-sync reply magic number error" now prints out what was wrong with the packet. Reviewed-by: Sergei Golubchik <serg@mariadb.org>
This commit is contained in:
parent
996e7fd7d5
commit
a0bfdef5e6
1 changed files with 8 additions and 3 deletions
|
@ -608,13 +608,17 @@ int Repl_semi_sync_master::report_reply_packet(uint32 server_id,
|
|||
DBUG_RETURN(-1);
|
||||
}
|
||||
else
|
||||
sql_print_error("Read semi-sync reply magic number error");
|
||||
sql_print_error("Read semi-sync reply magic number error. "
|
||||
"Got magic: %u command %u length: %lu",
|
||||
(uint) packet[REPLY_MAGIC_NUM_OFFSET], (uint) packet[0],
|
||||
packet_len);
|
||||
goto l_end;
|
||||
}
|
||||
|
||||
if (unlikely(packet_len < REPLY_BINLOG_NAME_OFFSET))
|
||||
{
|
||||
sql_print_error("Read semi-sync reply length error: packet is too small");
|
||||
sql_print_error("Read semi-sync reply length error: packet is too small: %lu",
|
||||
packet_len);
|
||||
goto l_end;
|
||||
}
|
||||
|
||||
|
@ -622,7 +626,8 @@ int Repl_semi_sync_master::report_reply_packet(uint32 server_id,
|
|||
log_file_len = packet_len - REPLY_BINLOG_NAME_OFFSET;
|
||||
if (unlikely(log_file_len >= FN_REFLEN))
|
||||
{
|
||||
sql_print_error("Read semi-sync reply binlog file length too large");
|
||||
sql_print_error("Read semi-sync reply binlog file length too large: %llu",
|
||||
(ulonglong) log_file_pos);
|
||||
goto l_end;
|
||||
}
|
||||
strncpy(log_file_name, (const char*)packet + REPLY_BINLOG_NAME_OFFSET, log_file_len);
|
||||
|
|
Loading…
Reference in a new issue