[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: |
|
||||||||||||
| 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. |