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

"REVOKE privilege(s), GRANT OPTION ON ... TO ..." is not possible

    XMLWordPrintable

Details

    Description

      It is possible to give the GRANT OPTION privilege to a user on a specific database or table along with other privileges on a single statement but not to REVOKE them the same way.

      For example, it is possible to GRANT those in a single statement :

      GRANT SELECT, INSERT ON `testuser`.table TO 'testuser'@'%' WITH GRANT OPTION;
      

      But two statements are required to REVOKE :

      REVOKE ALL PRIVILEGES ON `testuser`.table FROM 'testuser'@'%';
      REVOKE GRANT OPTION ON `testuser`.table FROM 'testuser'@'%';
      

      The single statement REVOKE is only possible for GRANT OPTION that are server-wide but not limited to a database or a table, such as :

      REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser'@'%';
      

      —

      A similar syntax for database/tables would be more consistent, for example :

      REVOKE ALL PRIVILEGES, GRANT OPTION ON `testuser`.table FROM 'testuser'@'%';
      

      While it's not consistent with the GRANT which requires the WITH GRANT OPTION at the end of the statement, it would still be more consistent than having to use two different statements.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jb-boin Jean Weisbuch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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