Details
-
Bug
-
Status: In Progress (View Workflow)
-
Blocker
-
Resolution: Unresolved
-
12.3.2
-
Related to install and upgrade
-
Q3/2026 Replic. Maintenance
Description
The MDEV-37530 introduced off-by-ones in both the loading and saving code for @@master_info_file and @@relay_log_info_file.
They cancel each other out in a fresh 12.3 installation, so nobody (not even behaviour tests) caught this pair of mistakes.
Effects assuming no external editing
10.0–12.2 servers always write the master.info key-value configurations in the same order, using_gtid, do_domain_ids, and ignore_domain_ids. As using_gtid is always written first, it is the configuration value which is dropped on upgrade.
As using_gtid is always written first, it is the configuration value which is dropped on upgrade.
The effect is that it will always be DEFAULT after upgrade, prior values of No or Current_Pos will be dropped and forgotten, and must be reset after the upgrade.
relay_log.info from MySQL 5.6 & MariaDB 10.0 onward will also fail to reload if the end of the file has no truncation leftovers.
The corresponding version ranges for master.info are MySQL 4.1–current & MariaDB 4.1–5.5.
Older versions use a fixed line count and are not affected.
The extra blank line written to the files is harmless and cosmetic in practice, as versions both before MDEV-37530 and after this bugfix have the compatibility requirement of ignoring unrecognized lines as garbage.
For example, notice the line number differences from these master.info files from 11.8 compared to 12.3:
master.info file from 11.8
1 33
|
2 master-bin.000001
|
3 7331
|
4 127.0.0.1
|
5 root
|
6
|
7 19000
|
8 1
|
9 1
|
10
|
11
|
12
|
13
|
14
|
15 0
|
16 60.000
|
17
|
18 0
|
19
|
20 0
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
32
|
33
|
34 using_gtid=2
|
35 do_domain_ids=0
|
36 ignore_domain_ids=0
|
37 END_MARKER
|
master.info file from 12.3
1 33
|
2 master-bin.000001
|
3 7332
|
4 127.0.0.1
|
5 root
|
6
|
7 19000
|
8 1
|
9 1
|
10
|
11
|
12
|
13
|
14
|
15 0
|
16 60.000
|
17
|
18 0
|
19
|
20 30
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
32
|
33
|
34
|
35 using_gtid=2
|
36 do_domain_ids=0
|
37 ignore_domain_ids=0
|
38 END_MARKER
|
12.3 expects the key-value parameters to start at line 35, whereas in 11.8, they are line 34.
Attachments
Issue Links
- blocks
-
MDEV-38972 Refactor MDEV-37530 and MDEV-28302 to Use Internal Data Structures
-
- Stalled
-
- is caused by
-
MDEV-37530 Refactor Master & Relay Log info to iterable tuples
-
- Closed
-