From 4347ad2dc67d47435162196ee395b284d9a73977 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 7 Feb 2018 16:51:16 +0800 Subject: [PATCH] auto ignore table starts with _ --- pymysqlreplication/row_event.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pymysqlreplication/row_event.py b/pymysqlreplication/row_event.py index ad645f2d..479fdc55 100644 --- a/pymysqlreplication/row_event.py +++ b/pymysqlreplication/row_event.py @@ -45,6 +45,12 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs) self._processed = False return + # Use pt-online-schema-change will auto generate a new table which name starts with '_', + # just ignore it. + if self.table.startswith('_'): + self._processed = False + return + if self.__only_schemas is not None and self.schema not in self.__only_schemas: self._processed = False return