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

Minor inconsistency between current_role and I_S.enabled_roles

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      I suppose I_S.ENABLED_ROLES should return at least the same as CURRENT_ROLE, but in fact it's not always so.

      --error 0,ER_CANNOT_USER
      drop role r1;
       
      create role r1;
      set role r1;
       
      select current_role();
      select * from information_schema.enabled_roles;
       
      drop role r1;
       
      select current_role();
      select * from information_schema.enabled_roles;

      After the role is dropped, current_role() still returns the name of the dropped role, while I_S.enabled_roles contains NULL:

      drop role r1;
      select current_role();
      current_role()
      r1
      select * from information_schema.enabled_roles;
      ROLE_NAME
      NULL

      Since current_role behavior is the same as for current_user (if the user is dropped, current_user for an open session still returns the name), I guess I_S.enabled_roles should do the same.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              elenst Elena Stepanova
              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.