From 559791196c1c907e628a03f7c4b40ee131078b81 Mon Sep 17 00:00:00 2001 From: Leo Q Date: Thu, 16 Nov 2023 12:12:33 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=96=B0=E5=A2=9Esql=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E8=A1=8C=E6=95=B0=E9=99=90=E5=88=B6"=20(#2388)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "新增sql执行行数限制 (#2366)" This reverts commit d32d7bc2f0d1d6463096ae85a5b2734a05f7264d. --- common/templates/config.html | 11 ----------- sql_api/api_workflow.py | 5 ----- 2 files changed, 16 deletions(-) diff --git a/common/templates/config.html b/common/templates/config.html index 8015fec61b..511dd607dd 100755 --- a/common/templates/config.html +++ b/common/templates/config.html @@ -161,17 +161,6 @@
SQL上线
placeholder="自动驳回的等级,1表示警告驳回,2和空表示错误才驳回,其他表示不驳回" /> -
- -
- -
-
diff --git a/sql_api/api_workflow.py b/sql_api/api_workflow.py index 0bd13d08c7..baf55e7974 100644 --- a/sql_api/api_workflow.py +++ b/sql_api/api_workflow.py @@ -69,11 +69,6 @@ def post(self, request): check_result = check_engine.execute_check( db_name=db_name, sql=request.data["full_sql"].strip() ) - max_sql_length = SysConfig().get("max_sql_length", default_value=10000) - if len(check_result.rows) > int(max_sql_length): - raise serializers.ValidationError( - {"errors": f"执行行数超过{str(max_sql_length)}行,请联系DBA核查!"} - ) except Exception as e: raise serializers.ValidationError({"errors": f"{e}"}) check_result.rows = check_result.to_dict()