[MDEV-21689] Add Sql_cmd for GRANT/REVOKE statements Created: 2020-02-08  Updated: 2020-02-17  Resolved: 2020-02-09

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System
Fix Version/s: 10.5.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-21743 Split up SUPER privilege to smaller p... Closed

 Description   

Let's do the following:

  • Remove a few members from LEX:
    • uint grant, grant_to_col, which_columns
    • List<LEX_COLUMN> columns
    • bool all_privileges
  • Rewrite the GRANT/REVOKE grammar to use more bison stack instead of directly accessing these LEX members.
  • Add Sql_cmd_grant* and Sql_cmd_revoke* classes.

Rationale:

  • Simplifying LEX
  • Making the grammar more maintainable (less hidden side effects)
  • We should eventually turn all statements to use Sql_cmd. So this is a step forward.

Note, this change will need to introduce some helper classes. At least:

  • A class representing the ON clause in GRANT/REVOKE
  • A class representing the entire GRANT/REVOKE statement

Generated at Thu Feb 08 09:09:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.