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

SET ROLE checks privileges differently from check_access()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.0.5
    • Component/s: None
    • Labels:
      None

      Description

      Test case:

      create user ''@localhost;
      create user c;
      grant select on mysql.* to c;
      create role r1;
      grant r1 to c;
      connect (c,localhost,c,,,,,);
      select user(), current_user();
      --error ER_TABLEACCESS_DENIED_ERROR
      select user from mysql.user group by user;
      set role r1;
      disconnect c;
      connection default;
      drop role r1;
      drop user c;
      drop user ''@localhost;
      

      Note that SELECT fails, while SET ROLE succeeds. Both grants were to c@%.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              serg Sergei Golubchik added a comment -

              pushed in 10.0-base

              Show
              serg Sergei Golubchik added a comment - pushed in 10.0-base

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  serg Sergei Golubchik
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: