Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
The mysqlbinlog client program needs to be updated to support GTID.
Here is a suggested list of things to be done:
- The --start-position and --stop-position options should be able to take
GTID positions; or maybe there should be new --start-gtid and --stop-gtid
options. Like --start-gtid=0-1-100,1-2-200,2-1-1000.
- A GTID position means the point just after that GTID. So starting from
GTID 0-1-100 and stopping at GTID 0-1-200, the first GTID output will
probably be 0-1-101 and the last one 0-1-200. Note that if some domain is
not specified in the position, it means to start from the begining,
respectively stop immediately in that domain.
- Starting and stopping GTID should work both with local files, and with
--read-from-remote-server. For the latter, there are a couple of extra
things that need doing in the master-slave protocol, see
get_master_version_and_clock() in sql/slave.cc.
- At the end of the dump, put these statements, to reduce the risk of those session variables incorrectly spilling into subsequent statements run in the same session:
SET session.server_id = @@global.server_id,
session.gtid_domain_id=@@global.gtid_domain_id;
Probably some more things will come up during the work, but this looks like a
reasonable start.
Attachments
Issue Links
- causes
-
MDEV-29803 Unexpected ERROR: Found out of order GTID after replaying binlog read from remote
-
- Open
-
- is part of
-
MDEV-27373 Q1 2022 release merge
-
- Closed
-
- relates to
-
MDEV-20119 Implement the --do-domain-ids, --ignore-domain-ids, and --ignore-server-ids options for mysqlbinlog
-
- Closed
-
-
MXS-2589 Adapt binlog router to
-
- Closed
-
-
MDEV-25348 Using Point-in-time-Recovery with mysqlbinlog without GTIDs
-
- Open
-
-
MXS-2581 Support DO_DOMAIN_IDS and IGNORE_DOMAIN_IDS for the Binlog Router
-
- Closed
-
This is actually a really good starter project for someone to get into working with the GTID code.
The tasks requires getting some moderate understanding on how GTID works in general, but the actual code that needs to be worked on is fairly isolated and doesn't need to touch a majority of the GTID and replication stuff.