Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6.9, 10.6.10
-
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...