Skip db name parsing if mts_accessed_dbs == 254 #369
Merged
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_dbs
as 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.