diff --git a/README.md b/README.md index c58af05..7ba25a4 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ UPDATE `test`.`test3` SET `addtime`='2016-12-10 13:03:22', `data`='中文', `id` **解析模式** ---stop-never 持续解析binlog。可选。,默认False,同步至执行命令时最新的binlog位置。 +--stop-never 持续解析binlog。可选。默认False,同步至执行命令时最新的binlog位置。 -K, --no-primary-key 对INSERT语句去除主键。可选。默认False diff --git a/binlog2sql/binlog2sql.py b/binlog2sql/binlog2sql.py index 0120837..971ec55 100755 --- a/binlog2sql/binlog2sql.py +++ b/binlog2sql/binlog2sql.py @@ -64,7 +64,7 @@ class Binlog2sql(object): def process_binlog(self): stream = BinLogStreamReader(connection_settings=self.conn_setting, server_id=self.server_id, log_file=self.start_file, log_pos=self.start_pos, only_schemas=self.only_schemas, - only_tables=self.only_tables, resume_stream=True) + only_tables=self.only_tables, resume_stream=True, blocking=True) flag_last_event = False e_start_pos, last_pos = stream.log_pos, stream.log_pos