mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-32628: Cryptic ERROR message & inconsistent behavior on incorrect SHOW BINLOG EVENTS FROM ...
Calling SHOW BINLOG EVENTS FROM <offset> with an invalid offset writes error messages into the server log about invalid reads. The read errors that occur from this command should only be relayed back to the user though, and not written into the server log. This is because they are read-only and have no impact on server operation, and the client only need be informed to correct the parameter. This patch fixes this by omitting binary log read errors from the server when the invocation happens from SHOW BINLOG EVENTS. Additionally, redundant error messages are omitted when calling the string based read_log_event from the IO_Cache based read_log_event, as the later already will report the error of the former. Reviewed By: ============ Kristian Nielsen <knielsen@knielsen-hq.org> Andrei Elkin <andrei.elkin@mariadb.com>
This commit is contained in:
committed by
Brandon Nesterenko
parent
f5fdb9cec5
commit
c42aadc388
@ -4208,11 +4208,17 @@ bool mysql_show_binlog_events(THD* thd)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Omit error messages from server log in Log_event::read_log_event. That
|
||||
is, we only need to notify the client to correct their 'from' offset;
|
||||
writing about this in the server log would be confusing as it isn't
|
||||
related to server operational status.
|
||||
*/
|
||||
for (event_count = 0;
|
||||
(ev = Log_event::read_log_event(&log,
|
||||
description_event,
|
||||
(opt_master_verify_checksum ||
|
||||
verify_checksum_once))); )
|
||||
verify_checksum_once), false)); )
|
||||
{
|
||||
if (event_count >= limit_start &&
|
||||
ev->net_send(protocol, linfo.log_file_name, pos))
|
||||
|
Reference in New Issue
Block a user