Skip to content

MDEV-40236: Generalize --flashback error messages for non-flashback#5454

Open
ParadoxV5 wants to merge 2 commits into
mainfrom
MDEV-20749
Open

MDEV-40236: Generalize --flashback error messages for non-flashback#5454
ParadoxV5 wants to merge 2 commits into
mainfrom
MDEV-20749

Conversation

@ParadoxV5

@ParadoxV5 ParadoxV5 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Note

This PR is based on #4767.
It targets main with #4767 included because targeting #4767 would make a PR in the contributor’s fork.

MDEV-20749 moved its improved error reporting from the flashback code path down to a common function that non-flashback mode also uses.
This brings a side effect that MDEV-20749 also added error reporting to mariadb-binlog non-flashback mode for this particular code path, whose errors (if anticipated) were completely silent previously.

These error messages assume that mariadb-binlog is in flashback mode, though; this commit removes this description from these messages so they make sense in both flashback and non-flashback modes.
It keeps these messages at this location to maintain the detail level and cross-mode sharing (albeit only bug MDEV-40511 is known to trigger one of these descriptive errors outside of flashback).


I have not included any tests (yet) because I find that whether mariadb-binlog reaches these errors with improved reporting depends on the implementation details of the duplicated code paths.
It’d be an entirely new feature, complete with reviews and QA, to turn this happy accident into a formally specified requirement.

Specifically,

  • Neither of MDEV-20749: Improve error reporting of mysqlbinlog when used with --flashback #4767’s fault injections can trigger these errors outside of flashback.
    I suspect it is because mariadb-binlog caught these faults and silently aborted at an earlier point.
  • MDEV-40236’s “reproduction” was dependent on MDEV-40511, an existing bug caused by a duplicate, obsolete check unrelated to MDEV-20749.
    Although we can generalize its error to be an unrecognized data type, what is the guarantee that unrecognized types should trigger one of these errors?
    Not to mention unrecognized types becoming recognized.

Handle corrupted row events by reporting whether the field length could
not be determined from metadata or whether the field extends past the
row buffer instead of falling out through debug-only assertion paths
or ad hoc exits during flashback row conversion. Propagate flashback
conversion failures through the normal mysqlbinlog error path so debug
builds produce the intended diagnostics cleanly.

Add replication tests covering corrupted BLOB metadata and corrupted
BLOB length prefixes using server-side debug injection to write broken
binlog contents and mysqltest-friendly mysqlbinlog invocation patterns.

Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
Reviewed-by: Georgi Kodinov <joro@mariadb.org>
@ParadoxV5
ParadoxV5 requested a review from bnestere July 25, 2026 03:59
@ParadoxV5 ParadoxV5 added MariaDB Corporation Replication Patches involved in replication labels Jul 25, 2026
@gemini-code-assist

This comment was marked as spam.

MDEV-20749 moved its improved error reporting from the flashback
code path down to a common function that non-flashback mode also uses.
This brings a side effect that MDEV-20749 also added error reporting
to `mariadb-binlog` non-flashback mode for this particular code path,
whose errors (if anticipated) were **completely silent** previously.

These error messages assume that `mariadb-binlog` is in flashback mode,
though; this commit removes this description from these messages
so they make sense in both flashback and non-flashback modes.
It keeps these messages at this location to maintain the detail
level and cross-mode sharing (albeit only bug MDEV-40511 is known
to trigger one of these descriptive errors outside of flashback).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MariaDB Corporation Replication Patches involved in replication

Development

Successfully merging this pull request may close these issues.

2 participants