salix/db/routines/util/procedures/proc_savePrivs.sql

16 lines
509 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`proc_savePrivs`()
BEGIN
/**
* Saves routine privileges, used to simplify the task of keeping
* routine privileges when they are modified due to the lack of
* CREATE OR REPLACE [PROCEDURE|FUNCTION].
* This procedure should be called before modifying a routine, to
* restore the saved privileges use proc_restorePrivs().
*/
CREATE TEMPORARY TABLE proc_privs
ENGINE = MEMORY
SELECT * FROM mysql.procs_priv;
END$$
DELIMITER ;