[MDEV-5522] Make CREATE/DROP/SET ROLE usable in stored programs Created: 2014-01-13  Updated: 2016-03-24

Status: Open
Project: MariaDB Server
Component/s: Authentication and Privilege System, Data Definition - Procedure
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Federico Razzoli Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None

Issue Links:
PartOf
includes MDEV-9443 Roles aren't supported in prepared st... Closed

 Description   

CREATE/DROP/SET ROLE work in stored procedures. However, they can only be used with a constant role name. To make the role name variable, IMO you could do one of these things:
a) Allow use of variables:
CREATE ROLE local_var, @user_var;
b) Allow CREATE/DROP in prepared statements. Currently they are not allowed.



 Comments   
Comment by Sergei Golubchik [ 2014-04-17 ]

it should probably be done both for users and roles

Comment by Federico Razzoli [ 2016-03-24 ]

MDEV-9443 has been fixed. So probably this task is much less important now.

Not useless, though: having to use a prepared statement to execute a certain statement in a procedure can be annoying.

Comment by Sergei Golubchik [ 2016-03-24 ]

Yes, allowing existing syntax to be prepared is one thing (it's MDEV-9443).
Supporting expressions for user and role names (variables and placeholders are expressions) is a different task.
Not useless, I agree.

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