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

MySQL查询语句权限Bug修复 #2778

Merged
merged 19 commits into from
Aug 30, 2024

Conversation

feiazifeiazi
Copy link
Contributor

Bug现象:

执行以下SQL时报错,不符合预期。

select * from (
    select 1 as n
    union
    select 2
) as num

  报错信息:

 无法校验查询语句权限,请联系管理员,错误信息:'Schema'

  "schema": snode["Source"]["Schema"]["O"] or db_name,
              ~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'Schema'

Bug描述:

goInception解析后的语法树,不存在Schema节点,导致报错。

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.08%. Comparing base (29bc308) to head (03aae5c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2778   +/-   ##
=======================================
  Coverage   78.08%   78.08%           
=======================================
  Files         122      122           
  Lines       17311    17311           
=======================================
  Hits        13518    13518           
  Misses       3793     3793           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hhyo hhyo merged commit 8996542 into hhyo:master Aug 30, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants