Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21689

Add Sql_cmd for GRANT/REVOKE statements

Details

    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

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            Rank Ranked higher
            bar Alexander Barkov made changes -
            Description Let's do the following:

            - Removing a few members from LEX:
            -- uint grant, grant_to_col, which_columns
            -- List<LEX_COLUMN> columns
            -- bool all_privileges
            - Rewriting 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
            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
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2020-02-09 03:08:21.0 2020-02-09 03:08:21.362
            bar Alexander Barkov made changes -
            Fix Version/s 10.5.1 [ 24029 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 103791 ] MariaDB v4 [ 134180 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.