You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
timing of event creation and the timing of now the table structure are different,
ex) drop table but replication did not reach that point
if self.table_id in table_map:
self.column_schemas = table_map[self.table_id].column_schemas
else:
self.column_schemas = self._ctl_connection._get_table_information(self.schema, self.table)
ordinal_pos_loc = 0
if len(self.column_schemas) != 0:
# Read columns meta data
column_types = bytearray(self.packet.read(self.column_count)) # read packet point
self.null_bitmask = self.packet.read((self.column_count + 7) / 8) #error packet goes
self.column_schemas doesn't yield any results, the code will exit the if statement.
However, since there is more column information in the remaining packets
If we don't read the packet here, an incorrect byte packet for null_bit_mask could be passed through.
The text was updated successfully, but these errors were encountered:
fix: #439
Here is how the scenario Goes:
1. There is a time difference between the event and the actual state of the database.
2. The actual database is dropped.
3. The python-replication-mysql application receives a table map event.
4. Since there is no cached result for the table_id, it tries to retrieve the database's column schema.
5. There are no column schema results from the database.
6. Packets containing information about the table map event's columns are still present.
7. The application exits the if statement, and the packets remain untouched.
8. Incorrect packets are inserted into the null_bitmask.
```
if self.table_id in table_map:
self.column_schemas = table_map[self.table_id].column_schemas
else:
self.column_schemas = self._ctl_connection._get_table_information(self.schema, self.table)
ordinal_pos_loc = 0
if len(self.column_schemas) != 0:
# Read columns meta data
column_types = bytearray(self.packet.read(self.column_count))
self.null_bitmask = self.packet.read((self.column_count + 7) / 8) #error packet goes here!
```
Problem
timing of event creation and the timing of now the table structure are different,
ex) drop table but replication did not reach that point
self.column_schemas doesn't yield any results, the code will exit the if statement.
However, since there is more column information in the remaining packets
If we don't read the packet here, an incorrect byte packet for null_bit_mask could be passed through.
The text was updated successfully, but these errors were encountered: