@@ -28,6 +28,7 @@ def read_offset_or_inline(packet, large):
28
28
return (t , packet .read_uint32 (), None )
29
29
return (t , packet .read_uint16 (), None )
30
30
31
+
31
32
class BinLogPacketWrapper (StructMysql ):
32
33
"""
33
34
Bin Log Packet Wrapper. It uses an existing packet object, and wraps
@@ -56,7 +57,7 @@ class BinLogPacketWrapper(StructMysql):
56
57
constants .WRITE_ROWS_EVENT_V2 : row_event .WriteRowsEvent ,
57
58
constants .DELETE_ROWS_EVENT_V2 : row_event .DeleteRowsEvent ,
58
59
constants .TABLE_MAP_EVENT : row_event .TableMapEvent ,
59
- #5.6 GTID enabled replication events
60
+ # 5.6 GTID enabled replication events
60
61
constants .ANONYMOUS_GTID_LOG_EVENT : event .NotImplementedEvent ,
61
62
constants .PREVIOUS_GTIDS_LOG_EVENT : event .NotImplementedEvent
62
63
@@ -105,7 +106,8 @@ def __init__(self, from_packet, table_map,
105
106
event_size_without_header = self .event_size - 19
106
107
107
108
self .event = None
108
- event_class = self .__event_map .get (self .event_type , event .NotImplementedEvent )
109
+ event_class = self .__event_map .get (
110
+ self .event_type , event .NotImplementedEvent )
109
111
110
112
if event_class not in allowed_events :
111
113
return
@@ -366,12 +368,12 @@ def read_binary_json_object(self, length, large):
366
368
key_offset_lengths = [(
367
369
self .read_uint32 (), # offset (we don't actually need that)
368
370
self .read_uint16 () # size of the key
369
- ) for _ in range (elements )]
371
+ ) for _ in range (elements )]
370
372
else :
371
373
key_offset_lengths = [(
372
374
self .read_uint16 (), # offset (we don't actually need that)
373
375
self .read_uint16 () # size of key
374
- ) for _ in range (elements )]
376
+ ) for _ in range (elements )]
375
377
376
378
value_type_inlined_lengths = [read_offset_or_inline (self , large )
377
379
for _ in range (elements )]
0 commit comments