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

Misleading error message for SET DEFAULT ROLE

    XMLWordPrintable

    Details

      Description

      CREATE USER u@'%' IDENTIFIED BY '123';
      CREATE ROLE r;
      SET DEFAULT ROLE r FOR u@'%';
      

      Yields:

      ERROR 1959 (OP000): User `root`@`localhost` has not been granted role `r`
      

      ... when really the problem is a missing grant for user `u` before trying to set the default role:

      GRANT r TO u;
      

      So therefore the error message ought to say something like this instead:

      User `u`@`%` has not been granted role `r`
      

      I think this behaviour is seen in all versions.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              karll Karl Levik
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.