Skip to content

fix read column Info from table map event #440

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pymysqlreplication/row_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs)
#Body
self.number_of_columns = self.packet.read_length_coded_binary()
self.columns = self.table_map[self.table_id].columns
column_schemas = self.table_map[self.table_id].column_schemas

if len(self.columns) == 0: # could not read the table metadata, probably already dropped
if len(column_schemas) == 0: # could not read the table metadata, probably already dropped
self.complete = False
if self._fail_on_table_metadata_unavailable:
raise TableMetadataUnavailableError(self.table)
Expand Down Expand Up @@ -624,7 +625,7 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs)

ordinal_pos_loc = 0

if len(self.column_schemas) != 0:
if self.column_count != 0:
# Read columns meta data
column_types = bytearray(self.packet.read(self.column_count))
self.packet.read_length_coded_binary()
Expand Down