From 586e3cb87c26a7a9be9569f3b34889e2acab3c88 Mon Sep 17 00:00:00 2001 From: gj19910723 <517109928@qq.com> Date: Mon, 2 May 2022 09:51:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbinlog2sql=E4=B8=AD=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=97=A5=E6=9C=9F=E8=BF=87=E6=BB=A4=E6=8A=A5=E9=94=99?= =?UTF-8?q?=20(#1485)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 可能是因为有日期和时间中有空格,参数会报错,添加引号后执行正常 --- sql/binlog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/binlog.py b/sql/binlog.py index ea50018c49..a2af1a32df 100644 --- a/sql/binlog.py +++ b/sql/binlog.py @@ -127,8 +127,8 @@ def binlog2sql(request): "start-position": start_pos, "stop-file": end_file, "stop-position": end_pos, - "start-datetime": start_time, - "stop-datetime": stop_time, + "start-datetime": '"'+start_time+'"', + "stop-datetime": '"'+stop_time+'"', "databases": ' '.join(only_schemas), "tables": ' '.join(only_tables), "only-dml": only_dml,