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

`mariadb-dump --delete-master-logs` does not purge binlog if it rotated mid-dump

    XMLWordPrintable

Details

    • Unexpected results

    Description

      I noticed --master-data and --delete-master-logs both queries SHOW MASTER STATUS.
      I was goïng to propose reüsing their short results to avoid an expensive second query, since --delete-master-logs includes --master-data.

      But then I reckoned that if the binary log rotates between the two queries, the two results would differ since the first result is stale.

      The attached test demonstrates this procedure using Debug Sync.
      The results show that --delete-master-logs only deleted the binary log up to File 2 exclusive, even though --master-data outputs CHANGE MASTER TO MASTER_LOG_FILE='File 4'.

      Fortunately, this sequencing means the main use of --delete-master-logs is unaffected.
      It'd be problematic if the inconsistency is the other way around: --master-data pointing to a file that --delete-master-logs has deleted.

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              ParadoxV5 Jimmy Hú
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2h 40m
                  2h 40m

                  Git Integration

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