Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update table text fields total length (#11095)

boojack70804a5814db
diff --git a/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length.go b/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length.go
index 59bb9382f0..8d1d8268a6 100644
--- a/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length.go
+++ b/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length.go
@@ -45,6 +45,7 @@ func (*TableMaximumVarcharLengthAdvisor) Check(ctx advisor.Context, _ string) ([
checker := &tableFieldsMaximumVarcharLengthChecker{
level: level,
title: string(ctx.Rule.Type),
+ catalog: ctx.Catalog,
maximum: payload.Number,
}
diff --git a/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length_test.go b/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length_test.go
index 6b7344213c..ece040134b 100644
--- a/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length_test.go
+++ b/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length_test.go
@@ -27,6 +27,10 @@ func TestGetTextLength(t *testing.T) {
s: "char(123)",
want: 123,
},
+ {
+ s: "varchar(123)",
+ want: 123,
+ },
}
for _, tc := range tests {
got := getTextLength(tc.s)
diff --git a/frontend/src/locales/sql-review/zh-CN.json b/frontend/src/locales/sql-review/zh-CN.json
index 7d13a92798..017f13a86b 100644
--- a/frontend/src/locales/sql-review/zh-CN.json
+++ b/frontend/src/locales/sql-review/zh-CN.json
@@ -444,7 +444,7 @@
"description": "连接的表越多,查询就越复杂,执行时间也越长。 通常情况下,最好将连接数控制在最低限度。",
"component": {
"number": {
- "title": "最大行数"
+ "title": "最大值"
}
}
},