-
Notifications
You must be signed in to change notification settings - Fork 682
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
Fix an issue in parsing default column charset #582
Fix an issue in parsing default column charset #582
Conversation
When parsing the default charset optional metadata, when handling the column index/collation number pairs, the column index is in the range of the number of columns with charset (not the number of all the columns).
@YAtOff Can you describe your mysql variable? for history
and Can you fix lint too?
|
MySQL variables
|
@@ -1005,14 +1005,17 @@ def _parsed_column_charset_by_default_charset( | |||
column_type_detect_function, | |||
): | |||
column_charset = [] | |||
position = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YAtOff
If binlog_row_metadata is FULL, you're probably right.
but your binlog_row_metadata = "MINIMAL" you can not enter this method.
because your self.__optional_meta_data value is False
def _sync_column_info(self):
if not self.__optional_meta_data:
# If optional_meta_data is False Do not sync Event Time Column Schemas
return
if len(self.optional_metadata.column_name_list) == 0:
# May Be Now BINLOG_ROW_METADATA = FULL But Before Action BINLOG_ROW_METADATA Mode = MINIMAL
return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my mistake. It's full
.
But if it's minimal
the tests pass without asserts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YAtOff Cool.
Description
When parsing the default charset optional metadata, when handling the column index/collation number pairs, the column index is in the range of the number of columns with charset (not the number of all the columns).
Like how it's done here: https://github.com/ClickHouse/ClickHouse/blob/001b67863a57c4d734d94e375e6fdeb4a9407951/src/Core/MySQL/MySQLReplication.cpp#L353
Type of Change
Checklist
Tests