diff --git a/db/routines/util/functions/binlogQueue_getDelay.sql b/db/routines/util/functions/binlogQueue_getDelay.sql index a440fc0ab..d6cf49377 100644 --- a/db/routines/util/functions/binlogQueue_getDelay.sql +++ b/db/routines/util/functions/binlogQueue_getDelay.sql @@ -1,6 +1,7 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`binlogQueue_getDelay`(vCode VARCHAR(255)) RETURNS BIGINT + READS SQL DATA NOT DETERMINISTIC BEGIN /** diff --git a/db/routines/vn/procedures/ticket_recalcByScope.sql b/db/routines/vn/procedures/ticket_recalcByScope.sql index e20244648..41105fe23 100644 --- a/db/routines/vn/procedures/ticket_recalcByScope.sql +++ b/db/routines/vn/procedures/ticket_recalcByScope.sql @@ -13,7 +13,7 @@ BEGIN DECLARE vDone BOOL; DECLARE vTicketFk INT; - DECLARE cCur CURSOR FOR + DECLARE cTickets CURSOR FOR SELECT id FROM ticket WHERE refFk IS NULL AND ((vScope = 'client' AND clientFk = vId) @@ -22,11 +22,11 @@ BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE; - OPEN cCur; + OPEN cTickets; myLoop: LOOP SET vDone = FALSE; - FETCH cCur INTO vTicketFk; + FETCH cTickets INTO vTicketFk; IF vDone THEN LEAVE myLoop; @@ -35,6 +35,6 @@ BEGIN CALL ticket_recalc(vTicketFk, NULL); END LOOP; - CLOSE cCur; + CLOSE cTickets; END$$ DELIMITER ;