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

mariadb-backup prepare lists wrong binary log position

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.9, 10.6.10
    • 10.4
    • mariabackup
    • None
    • Linux, Ubuntu 22.04, 20.04, n.a.

    Description

      MariaDB Backup provides IMHO wrong binary log position in output:

      IMHO this is correct:

      shell> mariadb-backup --backup ...

      [00] 2022-09-20 19:00:23 >> log scanned up to (1876443359)
      [00] 2022-09-20 19:00:23 Executing BACKUP STAGE END
      [00] 2022-09-20 19:00:23 All tables unlocked
      [00] 2022-09-20 19:00:23 Backup created in directory '/tmp/backup/'
      [00] 2022-09-20 19:00:23 MySQL binlog position: filename 'laptop5_mariadb-106_binlog.000165', position '522187', GTID of the last change '0-3337-32300'
      [00] 2022-09-20 19:00:23 Writing backup-my.cnf
      [00] 2022-09-20 19:00:23 ...done
      [00] 2022-09-20 19:00:23 Writing xtrabackup_info
      [00] 2022-09-20 19:00:23 ...done
      [00] 2022-09-20 19:00:23 Redo log (from LSN 1875941778 to 1876443359) was copied.
      [00] 2022-09-20 19:00:23 completed OK!

      This is still correct:

      SQL> SHOW MASTER STATUS;
      -----------------------------------------------------------------------+

      File Position Binlog_Do_DB Binlog_Ignore_DB

      -----------------------------------------------------------------------+

      laptop5_mariadb-106_binlog.000165 522187    

      -----------------------------------------------------------------------+

      But this is wrong! After prepare we get an lower/older position in the output of the prepare.

      shell> mariadb-backup --prepare

      2022-09-20 19:01:15 0 [Note] InnoDB: Starting final batch to recover 175 pages from redo log.
      2022-09-20 19:01:15 0 [Note] InnoDB: Last binlog file '/home/mysql/database/mariadb-106/binlog/laptop5_mariadb-106_binlog.000165', position 493513
      [00] 2022-09-20 19:01:15 Last binlog file /home/mysql/database/mariadb-106/binlog/laptop5_mariadb-106_binlog.000165, position 493513
      [00] 2022-09-20 19:01:15 completed OK!

      The output of xtrabackup_binlog_info is correct again:

      shell> cat xtrabackup_binlog_info
      laptop5_mariadb-106_binlog.000165 522187 0-3337-32300

      So the output of prepare is misleading and thus dangerous! Either suppress it or print it correctly. Or I have a complete wrong understanding of the output...

      Attachments

        Activity

          People

            knielsen Kristian Nielsen
            oli Oli Sennhauser
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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