-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WL#9049 Add a dynamic privilege for stored routine backup
Introduction: ------------- In 5.7, full access to stored routine (Stored Procedure or Stored Function) information (including the SP|SF code) is provided to the definer of routine, and to the user having SELECT privilege on mysql.proc. In 8.0, mysql.proc table is removed and the information is instead stored in Data Dictionary (which is hidden from users). This meant that non-definer user could not have full access on the routine. So backup of routine or getting exact create string of stored routine was not possible. So as workaround for this issue, full access on stored routine was provided to any user having global SELECT privilege. The goal of this WL is to introduce a new privilege SHOW_ROUTINE in order to provide an alternative to granting the global SELECT privilege which has a broader scope. Changes Made: ------------- 1) A new dynamic privilege "SHOW_ROUTINE" is introduced. 2) User having SHOW_ROUTINE privilege is able to a) View the `Create Procedure`|`Create Function` column of any SP|SF using "SHOW CREATE PROCEDURE|FUNCTION" b) View the `routine_definition` column of all rows in INFORMATION_SCHEMA.ROUTINES c) View the instructions of any SP|SF using "SHOW PROCEDURE|FUNCTION CODE" d) View the properties of all SP|SF using "SHOW PROCEDURE| FUNCTION STATUS" 3) On upgrade from 5.7 or a lower 8.0.x version, a user having global SELECT privilege is granted SHOW_ROUTINE, provided that there isn't already a user who has the privilege SHOW_ROUTINE Change-Id: I526e4566c7957257f16a54cef91d57ee8a6f1ba1
- Loading branch information
1 parent
1972346
commit 3e41e44
Showing
48 changed files
with
1,685 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.