Repository navigation
Conversation
Since column schema has deleted, we cannot get any none sources when optional_meta_data is False.
…ython-mysql-replication into feature/categorize-none-column
| return self.__read_datetime() | ||
| ret = self.__read_datetime() | ||
| if ret is None: | ||
| self.__none_sources[name] = "out of datetime range" |
There was a problem hiding this comment.
Maybe it should be a constant this will allow people to code behavior based on that. What do you think?
Contributor
Author
There was a problem hiding this comment.
@julien-duponchelle Thanks for your review!
Do you mean that setting constant like
OUTDATETIME = "out of datetime range"
and set __none_source like below?
self.__none_source[name] = OUTDATETIME
If this is right, I'm going to set constant by enum and set values with that :)
Contributor
Author
There was a problem hiding this comment.
@julien-duponchelle
I added pymysqlreplication/constants/NONE_SOURCE.py
and changed row_event.py to handle values according to the variables in NONE_SORUCE.py.
Please let me know if there's anything need to change :)
This was referenced Oct 14, 2023
sean-k1
approved these changes
Oct 14, 2023
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.
Resolve #479
Overview
In RowsEvent, there are three cases in which the column value is
None.NULL(ex: '0000-00-00 00:00:00')
Since we cannot distinguish these cases, we're going to provide detail information for
Nonevalue.Changes
__none_sourcesvariable.__read_values_name,we check detail information for
Nonecases and save it to__none_sources.dump()executes, we check for none_sources and show them together with column name and value.Example