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

current_user() in definer event/trigger/stored procedure/function/view to return real current user

    Details

      Description

      Having current_user() return the definer of the procedure (when not set to current_user) isn't very useful. Having it return the real user is more useful and consistent with the function defination.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              serg Sergei Golubchik added a comment -

              I don't think it's possible. SQL standard dictates that inside sql security definer routines, the value of the CURRENT_USER is the definer.

              Show
              serg Sergei Golubchik added a comment - I don't think it's possible. SQL standard dictates that inside sql security definer routines, the value of the CURRENT_USER is the definer.

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  danblack Daniel Black
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: