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

SET ROLE checks privileges differently from check_access()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • 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@%.

        Attachments

          Issue Links

            Activity

              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: