fix(binlog): refs #4409 Fix cursor name
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Juan Ferrer 2024-04-22 09:02:43 +02:00
parent bc45cafb40
commit 739ae82ace
2 changed files with 5 additions and 4 deletions

View File

@ -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
/**

View File

@ -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 ;