refs #2687 feat: add grant privileges for guest
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javier Segarra 2024-01-23 11:53:12 +01:00
parent 056dddd212
commit b5d883cdbe
4 changed files with 7 additions and 8 deletions

View File

@ -0,0 +1,3 @@
GRANT EXECUTE ON PROCEDURE util.tx_commit TO guest;
GRANT EXECUTE ON PROCEDURE util.tx_rollback TO guest;
GRANT EXECUTE ON PROCEDURE util.tx_start TO guest;

View File

@ -1,5 +1,3 @@
DROP PROCEDURE IF EXISTS util.tx_commit;
DELIMITER $$ DELIMITER $$
$$ $$
/** /**
@ -8,7 +6,7 @@ $$
* @param tx BOOL es true si existe transacción asociada * @param tx BOOL es true si existe transacción asociada
*/ */
CREATE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_commit`(IN tx BOOL) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_commit`(IN tx BOOL)
BEGIN BEGIN
IF tx THEN IF tx THEN
COMMIT; COMMIT;

View File

@ -1,5 +1,3 @@
DROP PROCEDURE IF EXISTS util.tx_rollback;
DELIMITER $$ DELIMITER $$
$$ $$
/** /**
@ -8,7 +6,7 @@ $$
* @param tx BOOL es true si existe transacción asociada * @param tx BOOL es true si existe transacción asociada
*/ */
CREATE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_rollback`(tx BOOL) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_rollback`(tx BOOL)
BEGIN BEGIN
IF tx THEN IF tx THEN
ROLLBACK; ROLLBACK;

View File

@ -1,4 +1,4 @@
DROP PROCEDURE IF EXISTS util.tx_start;
DELIMITER $$ DELIMITER $$
$$ $$
@ -8,7 +8,7 @@ $$
* @param tx BOOL es true si existe transacción asociada * @param tx BOOL es true si existe transacción asociada
*/ */
CREATE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_start`(tx BOOL) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`tx_start`(tx BOOL)
BEGIN BEGIN
IF tx THEN IF tx THEN
START TRANSACTION; START TRANSACTION;