[MDEV-9443] Roles aren't supported in prepared statements Created: 2016-01-21  Updated: 2016-03-22  Resolved: 2016-03-22

Status: Closed
Project: MariaDB Server
Component/s: Admin statements, Prepared Statements
Affects Version/s: None
Fix Version/s: 10.1.13

Type: Bug Priority: Major
Reporter: Rasmus Johansson (Inactive) Assignee: Vicențiu Ciorbaru
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-5522 Make CREATE/DROP/SET ROLE usable in s... Open
Sprint: 10.1.13

 Description   

It's not possible to use CREATE/DROP ROLE in prepared statements. Example:

MariaDB [(none)]> SET @createRole = 'CREATE ROLE developers';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> PREPARE stmtCreateRole FROM @createRole;
ERROR 1295 (HY000): This command is not supported in the prepared statement protocol yet



 Comments   
Comment by Elena Stepanova [ 2016-03-07 ]

Same for REVOKE, see MDEV-9691.

Comment by Vicențiu Ciorbaru [ 2016-03-22 ]

Hi Sergei,

Can you please review the following 2 patches for this MDEV?

http://lists.askmonty.org/pipermail/commits/2016-March/009151.html
http://lists.askmonty.org/pipermail/commits/2016-March/009158.html

Thanks!

Comment by Sergei Golubchik [ 2016-03-22 ]

You've simply enabled these commands. Is that enough? So far looks like it is.

Please add few tests with reexecution. Like:

PREPARE @stm1 "...";
EXECUTE @stmt1;
EXECUTE @stmt1;

Then ok to push.

Comment by Vicențiu Ciorbaru [ 2016-03-22 ]

Fixed with:
https://github.com/MariaDB/server/commit/c4bef7ad3c1528e902e88aa8b2446f29ffc1b0e6
https://github.com/MariaDB/server/commit/287f2d2947c15d1e7ff35ba123b37291147e1c85
https://github.com/MariaDB/server/commit/29753fb9f285afa0550c54409a985970460b9172

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