Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6.19
-
None
-
None
-
None
Description
How do you get this condition?
1) use an instance that is currently a slave
2) stop slave;
3) This instance will be the new master. Run some transactions.
4) reset master;
5) Run some transactions.
Now you see this:
show global variables where Variable_name in
|
('gtid_binlog_pos','gtid_binlog_state','gtid_current_pos','gtid_slave_pos');
|
+-------------------+-------------+
|
| Variable_name | Value |
|
+-------------------+-------------+
|
| gtid_binlog_pos | 0-2-240 |
|
| gtid_binlog_state | 0-2-240 |
|
| gtid_current_pos | 0-1-2817039 |
|
| gtid_slave_pos | 0-1-2817039 |
|
+-------------------+-------------+
|
You can run transactions on this host, and the sequence of the gtid_current_pos will not move forward. The server id is wrong. So, if you backup now, using mariadb-dump, you will see the wrong values in the dump file. Example:
mariadb-dump --all-databases --master-data=2 --dump-slave --gtid > /tmp/mdbdump/t.sql
|
grep 'SET GLOBAL gtid_slave_pos' /tmp/mdbdump/t.sql | tail -1
|
SET GLOBAL gtid_slave_pos='0-1-2817039';
|
Workaround:
Before backing up, run this command:
set global gtid_slave_pos=@@gtid_binlog_pos;
|
Now gtid_current_pos will be the same as gtid_binlog_pos and its sequence will move forward.
Attachments
Issue Links
- relates to
-
MDEV-37376 mariadb-backup: There are times in which gtid_current_pos is wrong making a backup intended to restore a slave unusable.
-
- Open
-