Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oracle数据库执行 delete语句时,表名使用了双引号包裹住,工单显示已正常结束,SQL实际没有执行,执行阶段为空 #2715

Open
ghostclearsky opened this issue Jul 3, 2024 · 0 comments

Comments

@ghostclearsky
Copy link

重现步骤

1、数据库类型为oracle数据库
2、提交执行SQL:
delete from "testtable" where id=1;
3、点击SQL检测按钮,下面的检测结果列表为空,但是从交互的请求响应内容可以看到,存在错误信息
image
4、点击 SQL提交按钮,可以正常提交成功
5、审核通过
6、点击执行SQL,工单状态为:已正常结束,SQL的当前阶段为空,审核/执行信息有错误消息。
经确认,SQL实际未执行。
image

预期外的结果

1、SQL检测按钮点击后未正常显示检测结果。
2、SQL未正常执行,但工单状态显示为已正常结束。

日志文本

[2024-07-03 14:06:24,981][MainThread:140516876363584][task_id:default][oracle.py:1071][WARNING]- Oracle 语句执行报错,第1个SQL:delete
from "TEST"
where ID=1,错误信息Traceback (most recent call last):
  File "/opt/archery/sql/engines/oracle.py", line 802, in execute_check
    elif len(object_name_list) > 0 and self.get_dml_table(
                                       ^^^^^^^^^^^^^^^^^^^
  File "/opt/archery/sql/engines/oracle.py", line 539, in get_dml_table
    table_name = re.match(r"^delete\s+from\s+([\w-]+)\s*", sql, re.M).group(1)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'

版本

1.11.1

部署方式

Docker

是否还有其他可以辅助定位问题的信息?比如数据库版本等

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant