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

Add support for GRANT, REVOKE openGauss #28455

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,7 @@ onObjectClause
| ALL PROCEDURES IN SCHEMA nameList
| ALL ROUTINES IN SCHEMA nameList
| CLIENT_MASTER_KEY nameList
| COLUMN_ENCRYPTION_KEY nameList
;

numericOnlyList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1444,3 +1444,7 @@ TRUNC
CLIENT_MASTER_KEY
: C L I E N T UL_ M A S T E R UL_ K E Y
;

COLUMN_ENCRYPTION_KEY
: C O L U M N UL_ E N C R Y P T I O N UL_ K E Y
;
1 change: 1 addition & 0 deletions test/it/parser/src/main/resources/case/dcl/grant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,5 @@
<grant sql-case-id="grant_view_definition_on_type" />
<grant sql-case-id="grant_execute_on_xml_schema_collection" />
<grant sql-case-id="grant_usage_on_client_master_key" />
<grant sql-case-id="grant_usage_on_column_encryption_key" />
</sql-parser-test-cases>
2 changes: 2 additions & 0 deletions test/it/parser/src/main/resources/case/dcl/revoke.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,6 @@
<revoke sql-case-id="revoke_execute_on_system_object" />
<revoke sql-case-id="revoke_view_definition_on_type" />
<revoke sql-case-id="revoke_execute_on_xml_schema_collection" />
<revoke sql-case-id="revoke_usage_on_column_encryption_key" />
<revoke sql-case-id="revoke_usage_on_client_master_key" />
</sql-parser-test-cases>
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,5 @@
<sql-case id="grant_view_definition_on_type" value="GRANT VIEW DEFINITION ON TYPE::schema1.type1 TO user1 WITH GRANT OPTION" db-types="SQLServer" />
<sql-case id="grant_execute_on_xml_schema_collection" value="GRANT EXECUTE ON XML SCHEMA COLLECTION::schema1.collection1 TO user1" db-types="SQLServer" />
<sql-case id="grant_usage_on_client_master_key" value="GRANT USAGE ON CLIENT_MASTER_KEY MyCMK1 to user1" db-types="openGauss" />
<sql-case id="grant_usage_on_column_encryption_key" value="GRANT USAGE ON COLUMN_ENCRYPTION_KEY MyCEK1 to user1" db-types="openGauss" />
</sql-cases>
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,6 @@
<sql-case id="revoke_execute_on_system_object" value="REVOKE EXECUTE ON sys.sp_addlinkedserver FROM public" db-types="SQLServer" />
<sql-case id="revoke_view_definition_on_type" value="REVOKE VIEW DEFINITION ON TYPE::schema1.type1 FROM user1 CASCADE" db-types="SQLServer" />
<sql-case id="revoke_execute_on_xml_schema_collection" value="REVOKE EXECUTE ON XML SCHEMA COLLECTION::schema1.xmlschemacollection1 FROM user1" db-types="SQLServer" />
<sql-case id="revoke_usage_on_column_encryption_key" value="REVOKE USAGE ON COLUMN_ENCRYPTION_KEY MyCEK1 FROM user1" db-types="openGauss" />
<sql-case id="revoke_usage_on_client_master_key" value="REVOKE USAGE ON CLIENT_MASTER_KEY MyCMK1 FROM user1" db-types="openGauss" />
</sql-cases>