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

Adding example for SET DEFAULT ROLE documentation

    XMLWordPrintable

Details

    Description

      I think that set-default-role may have better example and a context, with adding note that default_role as each role should be granted first (in second paragraph) to the user in order to have effect.
      Example could be:

      CREATE ROLE test_role;
      CREATE USER test_user;
      SET DEFAULT ROLE test_role FOR test_user; #error, role not granted
      GRANT test_role TO test_user; # ok
      SET DEFAULT ROLE test_role FOR test_user;
      # Get list of roles
      SELECT * FROM mysql.roles_mapping;
      # Or from mysql.user where default_role=Y
      SELECT * FROM mysql.user where default_role='Y';
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            anel Anel Husakovic
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.