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

ast, parser: add FUNCTION and PROCEDURE for GRANT object_type #1136

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Dec 22, 2020

What problem does this PR solve?

parser didn't support GRANT ... ON FUNCTION ..., where DM plans to parse and check privileges in pingcap/dm#1320

ref https://dev.mysql.com/doc/refman/5.7/en/grant.html

What is changed and how it works?

add ObjectTypeFunction and ObjectTypeProcedure

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

@@ -11774,13 +11776,22 @@ PrivType:
}

ObjectType:
%prec lowerThanFunction
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function is not a reserved keywork in 5.7 (but become reserved after 8.0.1). see https://dev.mysql.com/doc/refman/8.0/en/keywords.html#keywords-8-0-detailed-F

here I didn't change it to reserved to keep compatibility

@lance6716
Copy link
Contributor Author

PTAL @wjhuang2016 @leoppro @xhebox

Copy link
Contributor

@xhebox xhebox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added the status/LGT1 LGT1 label Dec 22, 2020
Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot removed the status/LGT1 LGT1 label Dec 22, 2020
@ti-srebot ti-srebot added the status/LGT2 LGT2 label Dec 22, 2020
@lance6716 lance6716 merged commit e2b44ff into pingcap:master Dec 22, 2020
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants