[MDEV-21839] Handle crazy offset to SHOW BINLOG EVENTS Created: 2020-02-28  Updated: 2023-11-06  Resolved: 2020-09-17

Status: Closed
Project: MariaDB Server
Component/s: Replication
Fix Version/s: 10.1.48, 10.2.35, 10.3.26, 10.4.16, 10.5.7

Type: Task Priority: Major
Reporter: Andrei Elkin Assignee: Sujatha Sivakumar (Inactive)
Resolution: Fixed Votes: 0
Labels: binlog-checksum

Issue Links:
Relates
relates to MDEV-32628 Cryptic ERROR message & inconsistent ... Closed

 Description   

SHOW BINLOG EVENTS FROM <"random"-pos> caused a variety of failures as reported in MDEV-18046. They are fixed but that approach is not future-proof as well as is not optimal to create extra check for being constructed
event parameters.
The extra checks can and should be avoided with conduction validation
to the supplied offset. The validation means scan of the requested log
to find the requested position as one that points to the beginning of an event. Scanning is meaningful only to a non-default binlog-checksum-off files (that fact is captured by MDEV-18046).



 Comments   
Comment by Sujatha Sivakumar (Inactive) [ 2020-05-15 ]

Hello Andrei,

Can you please review the fix for MDEV-21839.

Patch: https://github.com/MariaDB/server/commit/5bcf3104c94bfeeff2f9376b4d2065046b0e14de

Build Bot Testing: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.1-sujatha

Didn't add new tests as existing tests do the necessary testing:

binlog.binlog_show_binlog_event_random_pos
binlog.binlog_invalid_read_in_rotate

Comment by Sujatha Sivakumar (Inactive) [ 2020-05-18 ]

Hello Monty,

Can you please review the fix for MDEV-21839.

Patch: https://github.com/MariaDB/server/commit/61e34736742dab7401810a218c0f5d193409eea9
BuildBot Link: http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.1-sujatha

Thank you.

Comment by Sujatha Sivakumar (Inactive) [ 2020-09-17 ]

Patch approved by Andrei, on git hub.

Comment by Sujatha Sivakumar (Inactive) [ 2020-09-17 ]

Fix is pushed in 10.1.47.

10.2:
====
No merge conflicts. But following file changes are not required from 10.2 and higer versions.
Hence reverted it.

/mysql-test/r/ctype_cp932_binlog_stm.result

10.2: https://github.com/MariaDB/server/commit/af28b96e3d005d8d0cb99985ce61a78a7778aa20

10.3:
====
Clean merge from 10.2 to 10.3.

10.3: https://github.com/MariaDB/server/commit/edf45efe33f2aeaa01ff45eaeec832f841c0ace0

10.4:
====
https://github.com/MariaDB/server/commit/14ab041de76c8f74de222b21bc9951282bfe8898

10.5:
=====
https://github.com/MariaDB/server/commit/475de254a8591d5d8006570d914469e359de60cc

Generated at Thu Feb 08 09:10:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.