[MDEV-8017] current_user() in definer event/trigger/stored procedure/function/view to return real current user Created: 2015-04-19  Updated: 2023-03-22  Resolved: 2015-04-20

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Procedure, Events, Triggers, Views
Fix Version/s: N/A

Type: Task Priority: Minor
Reporter: Daniel Black Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-6901 [PATCH] session.gtid_domain_id should... Stalled
relates to MDEV-30908 Create INVOKING_USER() function In Review

 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.



 Comments   
Comment by Sergei Golubchik [ 2015-04-20 ]

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.

Generated at Thu Feb 08 07:24:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.