-
Notifications
You must be signed in to change notification settings - Fork 1k
Decoding of compressed binlog events #773
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
Decoding of compressed binlog events #773
Conversation
With this PR and this code: package main
import (
"context"
"os"
"github.com/go-mysql-org/go-mysql/mysql"
"github.com/go-mysql-org/go-mysql/replication"
)
func main() {
cfg := replication.BinlogSyncerConfig{
ServerID: 100,
Flavor: "mysql",
Host: "127.0.0.1",
Port: 8032,
User: "root",
Password: "msandbox",
}
syncer := replication.NewBinlogSyncer(cfg)
gtidSet, _ := mysql.ParseMysqlGTIDSet("")
streamer, _ := syncer.StartSyncGTID(gtidSet)
for {
ev, _ := streamer.GetEvent(context.Background())
ev.Dump(os.Stdout)
}
} And then on MySQL 8.0.32 with compression enabled: INSERT INTO t1 VALUES(111, "AAAAAAAAAAABBBBBBBBBBBBBBBCCCCCCCCCCCCCCC");
Then this is the output I get:
From
|
2e66968
to
29ab7e7
Compare
e10c715
to
b29c29f
Compare
With b29c29f it now decodes the events that are embedded in the payload of
|
@lance6716 @atercattus what would you suggest for what the next step is? One problem is that the |
41d5375
to
f9c9016
Compare
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.
rest lgtm
I have no suggestion for TransactionPayloadEvent, this PR is great 👍 And I can't remember more incompatibility with MySQL 8.0 for now. |
I'm working on support for PARTIAL_UPDATE_ROWS_EVENT. Except this, I also don't know any mysql8 incompatibilities. |
@lance6716 I think I've addressed all your comments. PTAL @atercattus feel free to poke me if there is something I can do to help with PARTIAL_UPDATE_ROWS_EVENT |
@dveeden, thanks. I hope, I can do this myself :) Also, this PR is not directly related to PARTIAL_UPDATE_ROWS_EVENT. |
Closes: #533