[MDEV-29167] new db-level SHOW CREATE ROUTINE privilege Created: 2022-07-26  Updated: 2023-11-14  Resolved: 2023-10-18

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System
Fix Version/s: 11.3.1

Type: Task Priority: Critical
Reporter: Nilnandan Joshi Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 1
Labels: Preview_11.3

Issue Links:
Blocks
PartOf

 Description   

please, add a new db-level privilege SHOW CREATE ROUTINE so that the user with ALL PRIVILEGES on db level would be able to see all routines in that db

Update after discussing with Serg:
EXECUTE_ACL CREATE_PROC_ACL ALTER_PROC_ACL allow to get info about the routine, but SHOW_CREATE_ROUTINE_ACL should give the text.

This privilege related to PROCEDURE or FUNCTION or PACKAGE.

The effect of this MDEV is that one can give a user the 'show create routine' privilege, which allows the user to see the procedure text:
Example:

grant show create routine on *.* to user@localhost;
show procedure code test_db.sp;



 Comments   
Comment by Oleksandr Byelkin [ 2023-08-28 ]

ROUTINES == PROCEDURE or FUNCTION or PACKAGE ?
I think TRIGGER is not routine in this sens but part of the table, right?

Comment by Oleksandr Byelkin [ 2023-09-04 ]

commit 44e692d0dbc69e2658e6e0e017d750fc62c0e8b8 (HEAD -> bb-11.3-MDEV-29167, origin/bb-11.3-MDEV-29167)
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date:   Mon Sep 4 13:04:06 2023 +0200
 
    MDEV-29167 new db-level SHOW CREATE ROUTINE privilege

Comment by Oleksandr Byelkin [ 2023-09-06 ]

commit 5c487eb813b50f4d7de55acb8229b192ce396e8b (HEAD -> bb-11.3-MDEV-29167)
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date:   Wed Sep 6 09:54:42 2023 +0200
 
    Convert priveleges string representation definition to non-error-pron STRING_WITH_LEN
 
commit 1b986fc4a078a4da166a54161fc51605b5e2d52e
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date:   Mon Sep 4 13:04:06 2023 +0200
 
    MDEV-29167 new db-level SHOW CREATE ROUTINE privilege

Comment by Oleksandr Byelkin [ 2023-09-07 ]

commit ecc135603805a36688b5ec55fe04fa2feee8e565 (HEAD -> bb-11.3-MDEV-29167, origin/bb-11.3-MDEV-29167)
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date:   Mon Sep 4 13:04:06 2023 +0200
 
    MDEV-29167 new db-level SHOW CREATE ROUTINE privilege

Comment by Sergei Golubchik [ 2023-09-08 ]

ecc1356038 is ok to push

Comment by Lena Startseva [ 2023-10-11 ]

Testing done, ok to push

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