Commit b2d723a
committed
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.html1 parent 95109e7 commit b2d723a
1 file changed
+53
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
232 | 261 | | |
233 | 262 | | |
234 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
235 | 267 | | |
236 | 268 | | |
237 | 269 | | |
238 | | - | |
| 270 | + | |
| 271 | + | |
239 | 272 | | |
240 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
241 | 285 | | |
242 | 286 | | |
243 | 287 | | |
| |||
254 | 298 | | |
255 | 299 | | |
256 | 300 | | |
257 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
258 | 307 | | |
259 | | - | |
| 308 | + | |
260 | 309 | | |
261 | 310 | | |
262 | 311 | | |
| |||
0 commit comments