Skip to content

Test for MDEV-39788 - #5147

Merged
ParadoxV5 merged 1 commit into
10.11from
MDEV-39788.test
Jul 27, 2026
Merged

Test for MDEV-39788#5147
ParadoxV5 merged 1 commit into
10.11from
MDEV-39788.test

Conversation

@ParadoxV5

@ParadoxV5 ParadoxV5 commented May 29, 2026

Copy link
Copy Markdown
Contributor

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_info to main.rpl_read_new_info so it

  • Checks this detail to remind future changes of this type of mistake.
  • Covers @@master_info as well.

While here, this commit also includes a new-format version
of MDEV-38020’s test to double as the value read check.

@ParadoxV5
ParadoxV5 requested a review from bnestere May 29, 2026 18:35
@ParadoxV5 ParadoxV5 added MariaDB Corporation Replication Patches involved in replication labels May 29, 2026
@CLAassistant

CLAassistant commented May 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

gemini-code-assist[bot]

This comment was marked as spam.

Comment thread mysql-test/main/rpl_read_new_info.test Outdated
@ParadoxV5

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Contributor Author

Approved as part of #5301

@ParadoxV5
ParadoxV5 enabled auto-merge (rebase) July 27, 2026 20:48
@ParadoxV5
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
ParadoxV5 enabled auto-merge (rebase) July 27, 2026 21:01
@ParadoxV5
ParadoxV5 merged commit ac3f338 into 10.11 Jul 27, 2026
15 of 17 checks passed
@ParadoxV5
ParadoxV5 deleted the MDEV-39788.test branch July 27, 2026 21:48
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>
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