Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39788

master.info is read and written one line too many compared to before

    XMLWordPrintable

Details

    • Related to install and upgrade
    • Fix upgrading to 12.3 not retaining the saved setting of `CHANGE MASTER TO master_use_gtid`
    • Q3/2026 Replic. Maintenance, Q3/2026 Replic. Development

    Description

      MDEV-37530 accidentally “fixed” the existing off-by-one inconsistency between @@master_info_file’s and @@relay_log_info_file’s formats.
      This difference self-cancels out in a fresh 12.3 installation and hides this (past) mistake until upgrading became the topic.

      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.
      [EDIT: due to the existing inconsistency, {{relay_log.info}} is not affected.]
      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

          Activity

            People

              bnestere Brandon Nesterenko
              ParadoxV5 Jimmy Hú
              Jimmy Hú Jimmy Hú
              Brandon Nesterenko Brandon Nesterenko
              Jimmy Hú Jimmy Hú
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 2.5d Original Estimate - 2.5d
                  2.5d
                  Remaining:
                  Time Spent - 3d 40m Remaining Estimate - 0.75d
                  0.75d
                  Logged:
                  Time Spent - 3d 40m Remaining Estimate - 0.75d
                  3d 40m

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.