Skip to content
Open
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: 4 additions & 1 deletion pymysqlreplication/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ def _dump(self):


class QueryEvent(BinLogEvent):
charset = 'utf-8'
on_errors = 'strict'
'''This evenement is trigger when a query is run of the database.
Only replicated queries are logged.'''
def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs):
Expand All @@ -174,7 +176,8 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs)
self.packet.advance(1)

self.query = self.packet.read(event_size - 13 - self.status_vars_length
- self.schema_length - 1).decode("utf-8")
- self.schema_length - 1).decode(
encoding=self.charset, errors=self.on_errors)
#string[EOF] query

def _dump(self):
Expand Down