You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def generate_args2cmd(self, args, shell):
"""
转换请求参数为命令行
:param args:
:param shell:
:return:
"""
conn_options = ['conn_options']
parse_mode_options = ['stop-never', 'no-primary-key', 'flashback']
range_options = ['back-interval', 'start-file', 'start-position', 'stop-file', 'stop-position',
'start-datetime', 'stop-datetime']
filter_options = ['databases', 'tables', 'only-dml', 'sql-type']
if shell:
cmd_args = f'python {shlex.quote(str(self.path))}' if self.path else ''
for name, value in args.items():
if name in conn_options:
cmd_args += f' {value}'
elif name in parse_mode_options and value:
cmd_args += f' --{name}'
elif name in range_options and value:
cmd_args += f" --{name}='{shlex.quote(str(value))}'"
elif name in filter_options and value:
if name == 'only-dml':
cmd_args += f' --{name}'
elif name == 'sql-type':
cmd_args += f' --{name} {value}'
else:
cmd_args += f' --{name} {shlex.quote(str(value))}'
注: cmd_args += f' --{name} {shlex.quote(str(value))}' 这句拼接的shell命令对参数加了单引号,binlog2sql无法识别,不能正常执行
预期外的结果
不需要
日志文本
不需要
版本
1.8.5
部署方式
手工部署
是否还有其他可以辅助定位问题的信息?比如数据库、浏览器、goInception等
不需要
The text was updated successfully, but these errors were encountered:
问题是否已经被报告?
重现步骤
##sql/plugins/binglog2sql.py中
def generate_args2cmd(self, args, shell):
"""
转换请求参数为命令行
:param args:
:param shell:
:return:
"""
conn_options = ['conn_options']
parse_mode_options = ['stop-never', 'no-primary-key', 'flashback']
range_options = ['back-interval', 'start-file', 'start-position', 'stop-file', 'stop-position',
'start-datetime', 'stop-datetime']
filter_options = ['databases', 'tables', 'only-dml', 'sql-type']
if shell:
cmd_args = f'python {shlex.quote(str(self.path))}' if self.path else ''
for name, value in args.items():
if name in conn_options:
cmd_args += f' {value}'
elif name in parse_mode_options and value:
cmd_args += f' --{name}'
elif name in range_options and value:
cmd_args += f" --{name}='{shlex.quote(str(value))}'"
elif name in filter_options and value:
if name == 'only-dml':
cmd_args += f' --{name}'
elif name == 'sql-type':
cmd_args += f' --{name} {value}'
else:
cmd_args += f' --{name} {shlex.quote(str(value))}'
注: cmd_args += f' --{name} {shlex.quote(str(value))}' 这句拼接的shell命令对参数加了单引号,binlog2sql无法识别,不能正常执行
预期外的结果
不需要
日志文本
版本
1.8.5
部署方式
手工部署
是否还有其他可以辅助定位问题的信息?比如数据库、浏览器、goInception等
不需要
The text was updated successfully, but these errors were encountered: