Skip db name parsing if mts_accessed_dbs == 254#369
Merged
julien-duponchelle merged 1 commit intojulien-duponchelle:mainfrom Apr 8, 2022
Merged
Skip db name parsing if mts_accessed_dbs == 254#369julien-duponchelle merged 1 commit intojulien-duponchelle:mainfrom
julien-duponchelle merged 1 commit intojulien-duponchelle:mainfrom
Conversation
I interpreted `mts_accessed_dbs` as db count in PR#360 (released in 0.27). However after reproducing kvitek's exception in Issue#278, I did some more research how it is set: https://github.com/mysql/mysql-server/blob/6846e6b2f72931991cc9fd589dc9946ea2ab58c9/sql/log_event.cc#L3598-L3602 (log_event.h /log_event.cc is responsible for writing low-level binlog, according to https://dev.mysql.com/doc/internals/en/source-files-related-to-the-binary-log.html) Turns out that if the value of the variables equals 254, the variable is no longer interpreted as the db count, but represent a following case: 1. db count equals 1 2. The name of the only db is blank. Therefore, I edited event.py so that after the value 254 is encountered, no further parsing is done regarding db names. So far I have reproduced the issue for `BeginEvent`. However, I have not yet figured out to incorporate into unittest. I will add tests ASAP.
|
@julien-duponchelle any chance to get this merged? ta! |
Owner
|
I'm going to ship a release |
Collaborator
Author
|
@julien-duponchelle @the4thdoctor |
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
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.
This PR is a fix for PR#360(released in 0.27)
I interpreted
mts_accessed_dbsas db count in PR#360 .However after reproducing kvitek's crash in Issue#278,
I did some more research how the variable is set:
https://github.com/mysql/mysql-server/blob/6846e6b2f72931991cc9fd589dc9946ea2ab58c9/sql/log_event.cc#L3598-L3602
(log_event.h /log_event.cc is responsible for writing low-level binlog,
according to
https://dev.mysql.com/doc/internals/en/source-files-related-to-the-binary-log.html)
Turns out that if the value of the variables equals 254,
the variable is no longer interpreted as the db count,
but represent a following case:
Therefore, I edited event.py so that after the value 254 is encountered,
no further parsing is done regarding db names. ("" doesn't need to be parsed)
So far I have reproduced the issue for
BeginEvent.However, I have not yet figured out to incorporate into unittest.
I will add tests ASAP.