Skip to content

Commit 97c9e2b

Browse files
committed
fix last order column only when DML
When we do not know columnInformation values dictionary key is always null so overwrite value Object. Thus always values dictionary has last order column object value To avoid user confusion, it is marked and displayed as UNKNOWN_COL.
1 parent 513b274 commit 97c9e2b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pymysqlreplication/row_event.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ def _read_column_data(self, cols_bitmap):
119119
column = self.columns[i]
120120
name = self.table_map[self.table_id].columns[i].name
121121
unsigned = self.table_map[self.table_id].columns[i].unsigned
122-
122+
if not name:
123+
# If you are using mysql 5.7 or mysql 8, but binlog_row_metadata = "MINIMAL",
124+
# we do not know the column information.
125+
# If you know column information,
126+
# mysql 5.7 version Users Use Under 1.0 version
127+
# mysql 8.0 version Users Set binlog_row_metadata = "FULL"
128+
name = "UNKNOWN_COL" + str(i)
123129
values[name] = self.__read_values_name(
124130
column,
125131
null_bitmap,

0 commit comments

Comments
 (0)