Parse NULL-bitmask in table map event#361
Merged
julien-duponchelle merged 1 commit intojulien-duponchelle:mainfrom Oct 18, 2021
Merged
Parse NULL-bitmask in table map event#361julien-duponchelle merged 1 commit intojulien-duponchelle:mainfrom
julien-duponchelle merged 1 commit intojulien-duponchelle:mainfrom
Conversation
[Fields in table map event](https://dev.mysql.com/doc/internals/en/table-map-event.html) [buffer layout for table map event](https://github.com/mysql/mysql-server/blob/beb865a960b9a8a16cf999c323e46c5b0c67f21f/libbinlogevents/include/rows_event.h#L633-L639) [null bitmask in mysql-server](https://github.com/mysql/mysql-server/blob/beb865a960b9a8a16cf999c323e46c5b0c67f21f/libbinlogevents/src/rows_event.cpp#L93)
Owner
|
I will ship a new release with your work. Thanks a lot |
| self.assertEqual(event.catalog_nz_code, b'std') | ||
| self.assertEqual(event.mts_accessed_db_names, [b'pymysqlreplication_test']) | ||
|
|
||
| def test_null_bitmask(self) |
Contributor
There was a problem hiding this comment.
def test_null_bitmask(self):
| for i in range(16): | ||
| values.append('0') | ||
|
|
||
| insert_query += f' ({",".join(values)})') |
Contributor
There was a problem hiding this comment.
insert_query += f' ({",".join(values)})'
Collaborator
Author
There was a problem hiding this comment.
Thank you for the comment. 👍👍
I will have these fixed in a separate PR.
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 adds null-bitmask attribute to table map event.
The attribute is a bit mask where (i - 1) th bit is set if i th column is nullable.
Added and passed relevant tests.
This feature is suggested in the following comments:
https://github.com/noplay/python-mysql-replication/blob/f70f05bc143bbf50dad5461dcb3a2a47a7f67202/pymysqlreplication/row_event.py#L651-L652
References
MySQL Documentation
mysql-server source code