We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Archery 工单里同时出现CREATE table 和DELETE FROM时,";"的位置前如果没有空格会报错,无法进行SQL检测。 后台日志会出现如下报错 from edf;,错误信息Traceback (most recent call last): File "/opt/archery/sql/engines/oracle.py", line 445, in execute_check elif len(object_name_list) > 0 and self.get_dml_table(db_name=db_name, sql=sql_lower, File "/opt/archery/sql/engines/oracle.py", line 230, in get_dml_table table_name = re.match(r"^delete\s+from\s(.+?)\s", sql, re.M).group(1) AttributeError: 'NoneType' object has no attribute 'group'
The text was updated successfully, but these errors were encountered:
正则匹配问题,已提交pr 1.delete语句没有where条件时匹配不到最后一个空格 table_name = re.match(r"^delete\s+from\s(.+?)", sql, re.M).group(1)
2.同时发现insert语句漏匹配insert all when... into这种情况 table_name = re.match(r"^insert\s+((into)|(all\s+into)|(all\s+when\s(.+?)into))\s(.+?)((|\s)", sql, re.M).group(6)
Sorry, something went wrong.
修复oracle审核正则匹配问题 #1169 (#1194)
b090240
Co-authored-by: 小圈圈 <rtttte@qq.com>
修复oracle审核正则匹配问题 hhyo#1169 (hhyo#1194)
cef6911
No branches or pull requests
问题描述
Archery 工单里同时出现CREATE table 和DELETE FROM时,";"的位置前如果没有空格会报错,无法进行SQL检测。

后台日志会出现如下报错
from edf;,错误信息Traceback (most recent call last):
File "/opt/archery/sql/engines/oracle.py", line 445, in execute_check
elif len(object_name_list) > 0 and self.get_dml_table(db_name=db_name, sql=sql_lower,
File "/opt/archery/sql/engines/oracle.py", line 230, in get_dml_table
table_name = re.match(r"^delete\s+from\s(.+?)\s", sql, re.M).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
版本信息
The text was updated successfully, but these errors were encountered: