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

Revoking Privilege on the Column Yields the Error

Details

    Description

      It's a regression in latest version 10.6.11, I did not try with other branches. But it used to work before this release.

      How to repeat:

      MariaDB [INFORMATION_SCHEMA]> CREATE TABLE test.test_getcolpriv(col1 INT, col2 INT);
      Query OK, 0 rows affected (0.041 sec)
      MariaDB [INFORMATION_SCHEMA]> GRANT SELECT (col1,col2) ON test.test_getcolpriv TO 'root';
      Query OK, 0 rows affected (0.025 sec)
      MariaDB [INFORMATION_SCHEMA]> GRANT INSERT (col1) ON test.test_getcolpriv TO 'root';
      Query OK, 0 rows affected (0.025 sec)
       
      MariaDB [INFORMATION_SCHEMA]> REVOKE SELECT (col1,col2) ON test.test_getcolpriv FROM 'root';
      Query OK, 0 rows affected (0.025 sec)
      MariaDB [INFORMATION_SCHEMA]> REVOKE INSERT (col1) ON test.test_getcolpriv FROM 'root';
      ERROR 1147 (42000): There is no such grant defined for user 'root' on host '%' on table 'test_getcolpriv'
      

      FLUSH PRIVILEGES in between fixes the thing. Also, any one GRANT/REVOKE from these two do not result in the error

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa added a comment -

            caused by 145932a57b3ffba4ebab25aa5 (MDEV-29465: Inherited columns privs for roles wrongly set mysql.table…)

            alice Alice Sherepa added a comment - caused by 145932a57b3ffba4ebab25aa5 ( MDEV-29465 : Inherited columns privs for roles wrongly set mysql.table…)
            cvicentiu Vicențiu Ciorbaru added a comment - - edited

            Hi serg

            Can you please review the patch at https://github.com/MariaDB/server/commit/6ed475f25cc20e88c66f52e13e691a2d8b0615e4

            All tests pass. The issue was caused by an incomplete update of GRANT_COLUMNS::rights vs GRANT_COLUMN::init_rights in replace_column_table.

            cvicentiu Vicențiu Ciorbaru added a comment - - edited Hi serg Can you please review the patch at https://github.com/MariaDB/server/commit/6ed475f25cc20e88c66f52e13e691a2d8b0615e4 All tests pass. The issue was caused by an incomplete update of GRANT_COLUMNS::rights vs GRANT_COLUMN::init_rights in replace_column_table.

            6ed475f25cc2 is ok to push

            serg Sergei Golubchik added a comment - 6ed475f25cc2 is ok to push

            People

              cvicentiu Vicențiu Ciorbaru
              Lawrin Lawrin Novitsky
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.