This commit is contained in:
parent
bc45cafb40
commit
739ae82ace
|
@ -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
|
||||
/**
|
||||
|
|
|
@ -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 ;
|
||||
|
|
Loading…
Reference in New Issue