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

Invalid role specification on OSX

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 10.0.11
    • Fix Version/s: 10.0.12
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OSX

      Description

      Setting a user role in OSX gives an error:

      Set up:

      create role developer;
      grant select,insert,update,delete on *.* to developer;
      grant usage on *.* to `user01`@`%` identified by 'user01';
      grant developer to `user01`@`%`;
      flush privileges;

      Verification:

      MariaDB [mysql]> select host, user, is_role from mysql.user;
      +-----------+-----------+---------+
      | host      | user      | is_role |
      +-----------+-----------+---------+
      | localhost | root      | N       |
      | 127.0.0.1 | root      | N       |
      | %         | user01    | N       |
      |           | developer | Y       |
      +-----------+-----------+---------+
      4 rows in set (0.01 sec)
       
      MariaDB [mysql]> select * from roles_mapping;
      +-----------+--------+-----------+--------------+
      | Host      | User   | Role      | Admin_option |
      +-----------+--------+-----------+--------------+
      | %         | user01 | developer | N            |
      +-----------+--------+-----------+--------------+
      1 rows in set (0.01 sec)

      Logging in as the user:

      MariaDB [(none)]> select current_user, current_role;
      +--------------+--------------+
      | current_user | current_role |
      +--------------+--------------+
      | user01@%     | NULL         |
      +--------------+--------------+
      1 row in set (0.01 sec)
       
      MariaDB [(none)]> set role developer;
      ERROR 1959 (OP000): Invalid role specification `developer`.

      This works fine in Linux and Windows.

        Attachments

          Activity

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            wfong Will Fong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved:

                Git Integration