Skip to content

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

chore: note the affected row limit is estimation (#11343)

Tianzhou (天舟)405ce0b47ccc
diff --git a/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.go b/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.go
index c41e7510ed..058d5370c3 100644
--- a/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.go
+++ b/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.go
@@ -130,7 +130,7 @@ func (checker *statementAffectedRowLimitChecker) handleStmt(lineNumber int) {
Status: checker.level,
Code: advisor.StatementAffectedRowExceedsLimit,
Title: checker.title,
- Content: fmt.Sprintf("\"%s\" affected %d rows. The count exceeds %d.", checker.text, rowCount, checker.maxRow),
+ Content: fmt.Sprintf("\"%s\" affected %d rows (estimated). The count exceeds %d.", checker.text, rowCount, checker.maxRow),
Line: lineNumber,
})
}
diff --git a/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.go b/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.go
index 7b9fca2a62..88ae3c7ca8 100644
--- a/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.go
+++ b/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.go
@@ -115,7 +115,7 @@ func (checker *statementAffectedRowLimitChecker) Visit(in ast.Node) ast.Visitor
Status: checker.level,
Code: code,
Title: checker.title,
- Content: fmt.Sprintf("The statement \"%s\" affected %d rows. The count exceeds %d.", checker.text, rows, checker.maxRow),
+ Content: fmt.Sprintf("The statement \"%s\" affected %d rows (estimated). The count exceeds %d.", checker.text, rows, checker.maxRow),
Line: in.LastLine(),
})
}
diff --git a/backend/tests/test-data/sql_review_mysql.yaml b/backend/tests/test-data/sql_review_mysql.yaml
index 356fa09fb4..ba294824da 100644
--- a/backend/tests/test-data/sql_review_mysql.yaml
+++ b/backend/tests/test-data/sql_review_mysql.yaml
@@ -552,7 +552,7 @@
{
"status": "WARNING",
"title": "statement.affected-row-limit",
- "content": "\"DELETE FROM user WHERE id <= 10;\" affected 10 rows. The count exceeds 5.",
+ "content": "\"DELETE FROM user WHERE id <= 10;\" affected 10 rows (estimated). The count exceeds 5.",
"sqlReviewReport": {
"line": 1,
"code": 209
diff --git a/frontend/src/locales/sql-review/en-US.json b/frontend/src/locales/sql-review/en-US.json
index f90ddd9c82..ff8921f02f 100644
--- a/frontend/src/locales/sql-review/en-US.json
+++ b/frontend/src/locales/sql-review/en-US.json
@@ -360,7 +360,7 @@
}
},
"statement-affected-row-limit": {
- "title": "Restrict the maximum number of updated or deleted rows.",
+ "title": "Restrict the maximum number of updated or deleted rows (estimated).",
"description": "Reveal the number of rows to be updated or deleted can help determine whether the statement meets business expectations. Suggestion error level: Warning",
"component": {
"number": {
diff --git a/frontend/src/locales/sql-review/es-ES.json b/frontend/src/locales/sql-review/es-ES.json
index 2190d9ae4e..1f3f186c5c 100644
--- a/frontend/src/locales/sql-review/es-ES.json
+++ b/frontend/src/locales/sql-review/es-ES.json
@@ -360,7 +360,7 @@
}
},
"statement-affected-row-limit": {
- "title": "Restringir el número máximo de filas actualizadas o eliminadas.",
+ "title": "Restringir el número máximo de filas actualizadas o eliminadas (estimada).",
"description": "Revelar el número de filas a actualizar o eliminar puede ayudar a determinar si la declaración cumple con las expectativas comerciales. Nivel de sugerencia de error: Advertencia",
"component": {
"number": {
diff --git a/frontend/src/locales/sql-review/ja-JP.json b/frontend/src/locales/sql-review/ja-JP.json
index 4a031d43a4..b5c3306546 100644
--- a/frontend/src/locales/sql-review/ja-JP.json
+++ b/frontend/src/locales/sql-review/ja-JP.json
@@ -360,7 +360,7 @@
}
},
"statement-affected-row-limit": {
- "title": "更新または削除される行数の最大制限",
+ "title": "更新または削除される行数の最大制限 (推定)",
"description": "更新または削除される行数を明示することで、ステートメントがビジネスの期待に沿っているかどうかを判断するのに役立ちます。提案エラーレベル:警告",
"component": {
"number": {
diff --git a/frontend/src/locales/sql-review/vi-VN.json b/frontend/src/locales/sql-review/vi-VN.json
index 6b12a3c433..ea812391e2 100644
--- a/frontend/src/locales/sql-review/vi-VN.json
+++ b/frontend/src/locales/sql-review/vi-VN.json
@@ -360,7 +360,7 @@
}
},
"statement-affected-row-limit": {
- "title": "Hạn chế số lượng hàng được cập nhật hoặc xóa tối đa.",
+ "title": "Hạn chế số lượng hàng được cập nhật hoặc xóa tối đa (ước lượng).",
"description": "Tiết lộ số hàng cần cập nhật hoặc xóa có thể giúp xác định xem câu lệnh có đáp ứng được kỳ vọng kinh doanh hay không. Mức độ lỗi đề xuất: Cảnh báo",
"component": {
"number": {
diff --git a/frontend/src/locales/sql-review/zh-CN.json b/frontend/src/locales/sql-review/zh-CN.json
index 474d39df0c..6d0d2c62b8 100644
--- a/frontend/src/locales/sql-review/zh-CN.json
+++ b/frontend/src/locales/sql-review/zh-CN.json
@@ -360,7 +360,7 @@
}
},
"statement-affected-row-limit": {
- "title": "限制最大更新或删除行数",
+ "title": "限制最大更新或删除行数(预估)",
"description": "通过提示更新或删除的行数辅助判断语句是否符合业务预期。建议错误等级:警告",
"component": {
"number": {