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

restore of dump with DEFINER = CURRENT_ROLE invalid

    XMLWordPrintable

    Details

      Description

      Say you are logged in with your role set to Admin (which is a valid role with most permissions) and you define a view, trigger, stored routine or schedule event with DEFINER = CURRENT_ROLE.

      Now do a SQL dump of the database (not the server, just the one database), create a fresh install of Mariadb (so the Admin role does not yet exist), and try to import that dump. It will import successfuly without errors.

      Now if you later create a role called Admin (with the same set of privilidges) and try to access the view you will get an error saying that it can't be accessed... i.e. DEFINER = Admin role and I've the the Admin role but I still can't access it.

      NOTE that if I drop the database and import it again (now that the users and roles are defined prior to import) everything works correctly as it should.

      I'm happy to provide additioal clarification as needed.

        Attachments

          Activity

            People

            Assignee:
            anel Anel Husakovic
            Reporter:
            rdyas Robert Dyas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration