-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use uint64 for binary log file position #17472
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Matt Lord <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
740bc3f
to
11d0404
Compare
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
73618f8
to
bb933e0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17472 +/- ##
==========================================
+ Coverage 67.66% 67.67% +0.01%
==========================================
Files 1584 1584
Lines 254394 254472 +78
==========================================
+ Hits 172139 172220 +81
+ Misses 82255 82252 -3 ☔ View full report in Codecov by Sentry. |
Boy, MySQL SURE IS FUN! Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
In the end it wasn't worth it as we only used it for one variable and it made backporting more risky/difficult. Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
go/mysql/flavor_filepos.go
Outdated
@@ -191,21 +191,21 @@ func (flv *filePosFlavor) readBinlogEvent(c *Conn) (BinlogEvent, error) { | |||
eDeleteRowsEventV0, eDeleteRowsEventV1, eDeleteRowsEventV2, | |||
eUpdateRowsEventV0, eUpdateRowsEventV1, eUpdateRowsEventV2: | |||
flv.savedEvent = event | |||
return newFilePosGTIDEvent(flv.file, event.nextPosition(flv.format), event.Timestamp()), nil | |||
return newFilePosGTIDEvent(flv.file, uint64(event.nextPosition(flv.format)), event.Timestamp()), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattlord could we update event.nextPosition(flv.format)
to return uint64
instead? Currently it returns uint32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was on the fence about that since we only ever seem to treat it as an integral and it's a uint32 in the protocol, but this does make it more uniform so I'm good with it. I did that here: 7a45ff5
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Description
The binary log file position is stored in MySQL as a
ulongulong
or uint64:But as you can see in the PR changes we stored the file position internally as a uint32.
The modified tests fail as expected w/o the type changes in the PR and pass in the PR branch, for example:
I ended up stripping the PR down so I think it's a pretty safe and easy thing to backport to all GA releases.
Related Issue(s)
Checklist