diff --git a/sql/engines/redis.py b/sql/engines/redis.py index a1ca6a1dd4..771ee60731 100644 --- a/sql/engines/redis.py +++ b/sql/engines/redis.py @@ -178,7 +178,7 @@ def execute_check(self, db_name=None, sql=""): id=line, errlevel=0, stagestatus="Audit completed", - errormessage="None", + errormessage="暂不支持显示影响行数", sql=cmd, affected_rows=0, execute_time=0, @@ -204,7 +204,7 @@ def execute_workflow(self, workflow): id=line, errlevel=0, stagestatus="Execute Successfully", - errormessage="None", + errormessage="暂不支持显示影响行数", sql=cmd, affected_rows=0, execute_time=t.cost, diff --git a/sql/engines/tests.py b/sql/engines/tests.py index ca3bd67371..74654ac01b 100644 --- a/sql/engines/tests.py +++ b/sql/engines/tests.py @@ -423,7 +423,7 @@ def test_execute_check(self): id=1, errlevel=0, stagestatus="Audit completed", - errormessage="None", + errormessage="暂不支持显示影响行数", sql=sql, affected_rows=0, execute_time=0, @@ -440,7 +440,7 @@ def test_execute_workflow_success(self, _execute_command): id=1, errlevel=0, stagestatus="Execute Successfully", - errormessage="None", + errormessage="暂不支持显示影响行数", sql=sql, affected_rows=0, execute_time=0, diff --git a/sql/utils/workflow_audit.py b/sql/utils/workflow_audit.py index e03bb18371..6383465322 100644 --- a/sql/utils/workflow_audit.py +++ b/sql/utils/workflow_audit.py @@ -211,7 +211,8 @@ def is_auto_review(self) -> bool: # 获取正则表达式 auto_review_regex = self.sys_config.get( - "auto_review_regex", "^alter|^create|^drop|^truncate|^rename|^delete" + "auto_review_regex", + "^alter|^create|^drop|^truncate|^rename|^delete|^del|^flushdb|^flushall|^lpop|^rpop", ) p = re.compile(auto_review_regex, re.I)