From d694741b5d5ed367658e2cb57efa8933b7a90090 Mon Sep 17 00:00:00 2001 From: hhyo Date: Mon, 19 Sep 2022 09:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=92=E6=A1=A3=E4=BB=BB=E5=8A=A1=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=97=B6=E5=85=B3=E9=97=ADschema=5Fobject=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=9A=84=E8=BF=9E=E6=8E=A5=20fix=20#1155?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 5fc6443c7f703f36138f9b6b46754cbf5cab6a56) --- sql/archiver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/archiver.py b/sql/archiver.py index 6746539215..d58be592ba 100644 --- a/sql/archiver.py +++ b/sql/archiver.py @@ -357,12 +357,13 @@ def archive(archive_id): dest_db_name = archive_info.dest_db_name dest_table_name = archive_info.dest_table_name # 目标表的字符集信息 - d_engine = get_engine(d_ins) - d_db = d_engine.schema_object.databases[dest_db_name] + schema_object = get_engine(d_ins).schema_object + d_db = schema_object.databases[dest_db_name] d_tb = d_db.tables[dest_table_name] d_charset = d_tb.options["charset"].value if d_charset is None: d_charset = d_db.options["charset"].value + schema_object.connection.close() # dest dest = ( rf"h={d_ins.host},u={d_ins.user},p={d_ins.password},P={d_ins.port},"