-
Notifications
You must be signed in to change notification settings - Fork 71
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
Added binlog events from MariaDB that can be skipped #297
base: main
Are you sure you want to change the base?
Added binlog events from MariaDB that can be skipped #297
Conversation
I'm a bit weary of changing the code like this upstream. We don't use MariaDB so can't perform any validations. IMO the best way to upstream this kind of code would be if the code written for MariaDB is only executed when some sort of configurable MariaDB mode is active. This is especially true this deep in the binlog streamer, as we don't want to accidentally introduce bugs that might lead to data corruption. |
I'm not sure if I have enough context to review this code either. Skipping events like this may break interrupt and resume. Without a proper understanding (and good documentation) on why the ev.Pos is 0 and how MariaDB is different from MySQL, I don't really know how to review and merge this safely. |
Ok after looking again through the code I come to the conclusion I went in the complete wrong direction. Each binlog file holds a new special Binlog Event, type 0xa4 (164), called START_ENCRIPTION event: however documentation also states:
I retrieved it as following:
logPosf: &{[153 64 231 96 164 60 0 0 0 40 0 0 0 0 0 0 0 128 0 1 1 0 0 0 131 225 116 62 161 1 56 114 104 248 22 224 93 202 121 243] 0xc00009a078 0xc000094090} In this case we should be able to ignore binlog event with type 0xa4 (164) |
Created a bug report for MariaDB at https://jira.mariadb.org/browse/MDEV-26118 |
They have reviewed the ticket and updated the documentation at https://mariadb.com/kb/en/start_encryption_event/ |
As I'm not sure if this impacts any other MySQL versions I have to still perform some checks.
Hope somebody can review this and perhaps say if there's any flaws
resolves #296