[MDEV-31054] EXECUTE denied to a role displays empty user Created: 2023-04-14  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.4, 10.6.12, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4, 10.5, 10.6, 10.11

Type: Bug Priority: Minor
Reporter: Robert Humphries Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None


 Description   

If you have a routine where the definer is set to a role, and that role doesn't have execute permission; the error message is execute command denied to user ''@'' instead of execute command denied to user 'role_name'.

Example Script:

CREATE ROLE 'test_role';
CREATE USER 'test_user'@'%' IDENTIFIED BY 'SDDSAghghgjhgsa123!!';
CREATE DATABASE `test_database`;
CREATE DEFINER='test_user' PROCEDURE `test_database`.`test_proc`() BEGIN END;
CREATE DEFINER='test_role' PROCEDURE `test_database`.`test_proc2`() BEGIN END;
CALL `test_database`.`test_proc`;
/* Output: execute command denied to user 'test_user'@'%' for routine 'test_database.test_proc' */
CALL `test_database`.`test_proc2`;
/* Output: execute command denied to user ''@'' for routine 'test_database.test_proc2' */
DROP DATABASE `test_database`;
DROP USER 'test_user';
DROP ROLE 'test_role';


Generated at Thu Feb 08 10:20:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.