Test for MDEV-39788 - #5147
Merged
Merged
Conversation
ParadoxV5
force-pushed
the
MDEV-39788.test
branch
from
June 2, 2026 23:29
e1a9f48 to
a41c498
Compare
ParadoxV5
commented
Jun 14, 2026
ParadoxV5
force-pushed
the
MDEV-39788.test
branch
from
June 27, 2026 01:25
a41c498 to
363f5e1
Compare
Contributor
Author
|
Windows failure: It looks like an existing bug, but I don’t know what’s going on, given MDEV-38020 should’ve covered it. |
ParadoxV5
force-pushed
the
MDEV-39788.test
branch
from
June 28, 2026 19:04
363f5e1 to
6d182c9
Compare
Contributor
Author
|
Approved as part of #5301 |
ParadoxV5
force-pushed
the
MDEV-39788.test
branch
from
July 27, 2026 20:47
8d41fb9 to
bf11805
Compare
ParadoxV5
enabled auto-merge (rebase)
July 27, 2026 20:48
ParadoxV5
disabled auto-merge
July 27, 2026 20:59
MDEV-39788 found that the recent refactor on the `main` (now 12.3) branch missed the (inconsistent) detail that, unlike `relay-log.info`, `master.info`’s line count _includes_ the line-count line itself. This commit extends and simplifies the test `rpl.rpl_read_new_relay_log_info` to `main.rpl_new_info` so it * Checks this detail to remind future changes of this type of mistake. * Covers `@@master_info` as well. * Covers the refactor’s buggy format as a downgrade/revert test. While here, this commit also includes a new-format version of MDEV-38020’s test to double as the value read check. Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
ParadoxV5
force-pushed
the
MDEV-39788.test
branch
from
July 27, 2026 21:01
bf11805 to
4d6ab8f
Compare
ParadoxV5
enabled auto-merge (rebase)
July 27, 2026 21:01
ParadoxV5
added a commit
that referenced
this pull request
Jul 28, 2026
The line-count lines in `master.info` and `relay-log.info`
have been inconsistent (off by one) since their introduction.
MDEV-37530 “fixed” this with its common code merger by chance,
changing `master.info` to use `relay-log.info`’s line-count definition.
This change, howëver, affected backward compatibility,
as `master.info` now expects an ignored MySQL-only line
where the first `key=value` option, `master_use_gtid`, is.
Since this legacy text-based format has limitations that make
it due for replacement, only code reüsablility is valuable,
and its consistency does not outweigh its compatibility.
Therefore, this commit solves this problem without reverting code by:
* Changing the writing code to be compatible with both interpretations
(albeit inconsistent with the reading code)
* Adding a shim entry to `master.info`’s list
to emulate prior versions’ reading behaviour
* Although this solution can only restore upgrade compatibility with
versions 10.0+, versions before MariaDB 10 have long been EOL.
While here, this commit also fixes code and
comments that contradict the actual effect.
[P.S.] The test for this regression is pushed to 10.11 in PR #5147.
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
ParadoxV5
added a commit
that referenced
this pull request
Jul 28, 2026
The line-count lines in `master.info` and `relay-log.info`
have been inconsistent (off by one) since their introduction.
MDEV-37530 “fixed” this with its common code merger by chance,
changing `master.info` to use `relay-log.info`’s line-count definition.
This change, howëver, affected backward compatibility,
as `master.info` now expects an ignored MySQL-only line
where the first `key=value` option, `master_use_gtid`, is.
Since this legacy text-based format has limitations that make
it due for replacement, only code reüsablility is valuable,
and its consistency does not outweigh its compatibility.
Therefore, this commit solves this problem without reverting code by:
* Changing the writing code to be compatible with both interpretations
(albeit inconsistent with the reading code)
* Adding a shim entry to `master.info`’s list
to emulate prior versions’ reading behaviour
* Although this solution can only restore upgrade compatibility with
versions 10.0+, versions before MariaDB 10 have long been EOL.
While here, this commit also fixes code and
comments that contradict the actual effect.
[P.S.] The test for this regression is pushed to 10.11 in PR #5147.
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR is intentionally based on an outdated 10.11 commit, but one that 12.3 has merged with, so the actual fix can be based on both this test and the 12.3 version.
MDEV-39788 found that the recent refactor on the
main(now 12.3) branch missed the (inconsistent) detail that, unlike@@relay_log_info,@@master_info’s line count includes the line-count line itself.This commit extends and simplifies the test
rpl.rpl_read_new_relay_log_infotomain.rpl_read_new_infoso it@@master_infoas well.While here, this commit also includes a new-format version
of MDEV-38020’s test to double as the value read check.