Skip to content

Commit

Permalink
fix(backend): mysql配置log_error_verbosity转成字符串,否则会反序列化失败 #7068
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq committed Sep 23, 2024
1 parent 73276af commit 746fc56
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 746fc56

Please sign in to comment.