Skip to content

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

chore: add i18n for disallow using filesort rule (#11010)

boojack1baf9de72947
diff --git a/frontend/src/locales/sql-review/en-US.json b/frontend/src/locales/sql-review/en-US.json
index 06c8d11f36..238e2329fa 100644
--- a/frontend/src/locales/sql-review/en-US.json
+++ b/frontend/src/locales/sql-review/en-US.json
@@ -387,6 +387,10 @@
"title": "Prohibit using temporary tables",
"description": "Temporary tables are not recommended for use in production environments. They can cause resource contention and performance issues. Suggestion error level: Warning"
},
+ "statement-disallow-using-filesort": {
+ "title": "Prohibit using filesort",
+ "description": "Filesort is a resource-intensive operation and may cause serious performance impact. Suggestion error level: Warning"
+ },
"schema-backward-compatibility": {
"title": "Check application backward compatibility",
"description": "Some changes may affect running applications, such as modifying the name of database object, adding new constraints, etc. This rule can avoid careless changes that lead to the failure of existing application. Suggestion error level: Warning"
diff --git a/frontend/src/locales/sql-review/es-ES.json b/frontend/src/locales/sql-review/es-ES.json
index 912c46b3c6..50dc7a7df5 100644
--- a/frontend/src/locales/sql-review/es-ES.json
+++ b/frontend/src/locales/sql-review/es-ES.json
@@ -387,6 +387,10 @@
"title": "Prohibir el uso de tablas temporales",
"description": "Las tablas temporales pueden causar problemas de rendimiento y de mantenimiento. Nivel de error sugerido: Advertencia"
},
+ "statement-disallow-using-filesort": {
+ "title": "Prohibir el uso de filesort",
+ "description": "El uso de filesort puede causar un impacto grave en el rendimiento. Nivel de error sugerido: Advertencia"
+ },
"schema-backward-compatibility": {
"title": "Comprobación de la compatibilidad con versiones anteriores de la aplicación",
"description": "Algunos cambios pueden afectar las aplicaciones en ejecución, como modificar el nombre del objeto de la base de datos, agregar nuevas restricciones, etc. Esta regla puede evitar cambios descuidados que lleven al fallo de la aplicación existente. Nivel de error sugerido: Advertencia"
diff --git a/frontend/src/locales/sql-review/ja-JP.json b/frontend/src/locales/sql-review/ja-JP.json
index c6a36283f6..bd21d11160 100644
--- a/frontend/src/locales/sql-review/ja-JP.json
+++ b/frontend/src/locales/sql-review/ja-JP.json
@@ -387,6 +387,10 @@
"title": "一時テーブルの使用を禁止する",
"description": "一時テーブルは、データの永続化が不要な場合にのみ使用することをお勧めします。一時テーブルはディスクに書き込まれるため、パフォーマンスが低下する可能性があります。提案エラーレベル:警告"
},
+ "statement-disallow-using-filesort": {
+ "title": "ファイルソートの使用を禁止する",
+ "description": "ファイルソートは、データの大量の読み書きを伴うため、パフォーマンスが低下する可能性があります。提案エラーレベル:警告"
+ },
"schema-backward-compatibility": {
"title": "アプリケーションの後方互換性を確認する",
"description": "一部の変更は実行中のアプリケーションに影響を与える可能性があります。データベースオブジェクトの名前の変更や新しい制約の追加などが該当します。このルールにより、既存のアプリケーションの障害を防ぐことができます。提案されるエラーレベル:警告"
diff --git a/frontend/src/locales/sql-review/vi-VN.json b/frontend/src/locales/sql-review/vi-VN.json
index e859b04a52..820fd19cd5 100644
--- a/frontend/src/locales/sql-review/vi-VN.json
+++ b/frontend/src/locales/sql-review/vi-VN.json
@@ -387,6 +387,10 @@
"title": "Cấm sử dụng bảng tạm",
"description": "Bảng tạm có thể gây ra tình trạng khóa cấp độ bảng và tiêu tốn một lượng lớn tài nguyên. Mức độ lỗi đề xuất: Lỗi"
},
+ "statement-disallow-using-filesort": {
+ "title": "Cấm sử dụng sắp xếp tệp",
+ "description": "Sắp xếp tệp có thể gây tốn tài nguyên không cần thiết và cũng có thể gây ra kết quả không mong muốn trong ứng dụng khi bảng thêm hoặc xóa cột. Mức độ lỗi đề xuất: Lỗi"
+ },
"schema-backward-compatibility": {
"title": "Kiểm tra khả năng tương thích ngược của ứng dụng",
"description": "Một số thay đổi có thể ảnh hưởng đến các ứng dụng đang chạy, chẳng hạn như sửa đổi tên đối tượng cơ sở dữ liệu, thêm các ràng buộc mới, v.v. Quy tắc này có thể tránh những thay đổi bất cẩn dẫn đến lỗi ứng dụng hiện có. Mức độ lỗi đề xuất: Cảnh báo"
diff --git a/frontend/src/locales/sql-review/zh-CN.json b/frontend/src/locales/sql-review/zh-CN.json
index 410a1d67b0..561290e967 100644
--- a/frontend/src/locales/sql-review/zh-CN.json
+++ b/frontend/src/locales/sql-review/zh-CN.json
@@ -384,9 +384,13 @@
"description": "在会话开始时未正确设置角色语句可能导致未经授权的访问或权限分配不当,可能危及数据安全性和完整性。错误等级:警告"
},
"statement-disallow-using-temporary": {
- "title": "禁止使用临时表",
+ "title": "禁止 Using temporary",
"description": "禁止 Using temporary 可以帮助优化查询性能,减少系统资源的消耗,提高系统的稳定性和可靠性。建议错误等级:警告"
},
+ "statement-disallow-using-filesort": {
+ "title": "禁止 Using filesort",
+ "description": "禁止 Using filesort 可以帮助优化查询性能,减少系统资源的消耗,提高系统的稳定性和可靠性。通常,通过合适的索引、查询优化和数据模型设计,可以避免或减少文件排序的需要。建议错误等级:警告"
+ },
"schema-backward-compatibility": {
"title": "检查应用向后兼容性",
"description": "某些变更可能影响现有应用功能,例如修改数据库对象名,增加新的约束等,此规范可避免不谨慎变更导致现有应用运行失败。建议错误等级:警告"
diff --git a/frontend/src/types/sql-review-schema.yaml b/frontend/src/types/sql-review-schema.yaml
index 6469a5f3ff..c3feb456c6 100644
--- a/frontend/src/types/sql-review-schema.yaml
+++ b/frontend/src/types/sql-review-schema.yaml
@@ -258,6 +258,11 @@ ruleList:
engineList:
- MYSQL
componentList: []
+ - type: statement.disallow-using-filesort
+ category: STATEMENT
+ engineList:
+ - MYSQL
+ componentList: []
- type: naming.table
category: NAMING
engineList:
diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.ts
index b30daef7f2..1cdcb4eb94 100644
--- a/frontend/src/types/sqlReview.ts
+++ b/frontend/src/types/sqlReview.ts
@@ -153,6 +153,7 @@ export type RuleType =
| "statement.create-specify-schema"
| "statement.check-set-role-variable"
| "statement.disallow-using-temporary"
+ | "statement.disallow-using-filesort"
| "schema.backward-compatibility"
| "database.drop-empty-database"
| "system.charset.allowlist"