-
Notifications
You must be signed in to change notification settings - Fork 689
Mariadb 10.6.12: Mitigate corrupt binlog event bug #399
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
Merged
julien-duponchelle
merged 10 commits into
julien-duponchelle:main
from
Samira-El:corrupt_binlog_event
May 7, 2023
Merged
Mariadb 10.6.12: Mitigate corrupt binlog event bug #399
julien-duponchelle
merged 10 commits into
julien-duponchelle:main
from
Samira-El:corrupt_binlog_event
May 7, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi @julien-duponchelle, can you please take a look at this? |
Hi @julien-duponchelle, do you reckon this has a chance of being merged? |
13 tasks
Hi @Samira-El that sound correct. Sorry I'm slow to reply :( I should be able to do a release at the end of next week. |
Thanks Julien! |
And it's released ! |
thank you 🥇 ! |
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
After upgrading our production databases from MariaDB 10.4 to 10.6.12, we started running into an issue which appears to be a bug in this Mariadb version, see the stacktrace:
This error is coming from this function in Mariadb's source code.
The bug is triggered when using
BinLogStreamReader
with binlog coordinates (not GTID), the code doesn't specify the slave capability thus the conditionmariadb_slave_capability < MARIA_SLAVE_CAPABILITY_GTID
passes and Mariadb then tries to replace the GTID event with a dummy one but fails, we can mitigate this by settingmariadb_slave_capability=4
in the non-gtid path too (as it's done in the gtid one), it would not be an issue because the library has had support for MariaDB GTID events for sometime now.This fix has been tested against the same production DB and it's working fine and we receive a MariaDBGtidEvent:
Running the query
set @mariadb_slave_capability=4
against mysql doesn't do anything hence no need I reckon to run this in anif
block which would require knowing the DB engine (mysql or mariadb), there is a flagis_mariadb
but it's false and not required for the non-gtid path, using it would make this a breaking change for downstream users so I'm trying to avoid that, but needs be, I can make it dynamic to detect the DB engine type.