You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replication: Support GTID tag in PreviousGTIDsEvent (#952)
* replication: Support GTID tag in PreviousGTIDsEvent
Issue: ref #845
The `PreviousGTIDsEvent` / `PREVIOUS_GTIDS_LOG_EVENT` has changed to
work with tagged GTIDs.
First the `uuidCount` has changed, it encodes the GTID format. Here
format 1 is tagged and format 0 is untagged.
Then each entry may have a tag. If there is a tag then the uuid itself
isn't printed but the tag is appended to the last entry.
Examples:
`896e7882-18fe-11ef-ab88-22222d34d411:1-3`
regular format, compatible with both formats
`896e7882-18fe-11ef-ab88-22222d34d411:1-4:aaaa:1`
tagged format.
Combination of
- `896e7882-18fe-11ef-ab88-22222d34d411:1-4`
- `896e7882-18fe-11ef-ab88-22222d34d411:aaaa:1`
`896e7882-18fe-11ef-ab88-22222d34d411:1-4:aaaa:1:abc:1-3:bbbbb:1:bbbbbb:1:x:1,896e7882-18fe-11ef-ab88-22222d34d412:1-2`
Combination of:
```
896e7882-18fe-11ef-ab88-22222d34d411:1-4
:aaaa:1
🔤1-3
:bbbbb:1
:bbbbbb:1
❌1,
896e7882-18fe-11ef-ab88-22222d34d412:1-2
```
Please also see: `mysqlbinlog --read-from-remote-server --hexdump $binlogfile` to see how MySQL encodes/decodes this.
See also:
- https://dev.mysql.com/doc/refman/8.4/en/replication-gtids-concepts.html
* Add test
* Add more tests
* Update replication/event.go
Co-authored-by: lance6716 <[email protected]>
* Update based on review
* add my suggestions
Signed-off-by: lance6716 <[email protected]>
* add test for long tag
Signed-off-by: lance6716 <[email protected]>
---------
Signed-off-by: lance6716 <[email protected]>
Co-authored-by: lance6716 <[email protected]>
0 commit comments