From 746fc56a2b4464d422caff95b2e87ccf18d6d10d Mon Sep 17 00:00:00 2001 From: yuanruji Date: Mon, 23 Sep 2024 10:54:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(backend):=20mysql=E9=85=8D=E7=BD=AElog=5Fer?= =?UTF-8?q?ror=5Fverbosity=E8=BD=AC=E6=88=90=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=EF=BC=8C=E5=90=A6=E5=88=99=E4=BC=9A=E5=8F=8D=E5=BA=8F=E5=88=97?= =?UTF-8?q?=E5=8C=96=E5=A4=B1=E8=B4=A5=20#7068?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/utils/mysql/mysql_act_playload.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py b/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py index b9faa88f29..41c8ce6189 100644 --- a/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py +++ b/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py @@ -137,12 +137,22 @@ def deal_mysql_config(self, db_version: str, origin_configs: dict, init_configs: if "log_warnings" in cfg["mysqld"]: value = cfg["mysqld"]["log_warnings"] if value == "0": - cfg["mysqld"]["log_error_verbosity"] = 1 + cfg["mysqld"]["log_error_verbosity"] = "1" elif value == "1": - cfg["mysqld"]["log_error_verbosity"] = 2 + cfg["mysqld"]["log_error_verbosity"] = "2" else: - cfg["mysqld"]["log_error_verbosity"] = 3 + cfg["mysqld"]["log_error_verbosity"] = "3" del cfg["mysqld"]["log_warnings"] + for key in [ + "innodb_file_format", + "query_cache_size", + "query_cache_type", + "show_compatibility_56", + "query_response_time_stats", + "userstat", + ]: + if key in cfg["mysqld"]: + del cfg["mysqld"][key] # 这里应该是社区版本等非Tendb数据库的版本需要处理的参数 # 介质管理暂未记录介质来源属性 if db_version >= "8.0.30":