You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SET max_sp_recursion_depth=255;
DROPTABLE IF EXISTS PEOPLE;
CREATETABLEPEOPLE (NAME VARCHAR(30));
DROP PROCEDURE IF EXISTS RECURSIVE_PROCEDURE;
DELIMITER //
CREATE PROCEDURE RECURSIVE_PROCEDURE(IN counter INT)
BEGINSET counter := counter +1;
IF counter >3 THEN
SELECT CONCAT('Ended with value ', counter) AS RESULT;
ELSE
CALL RECURSIVE_PROCEDURE(counter);
END IF;
END //
DELIMITER ;
CALL RECURSIVE_PROCEDURE(1);
The text was updated successfully, but these errors were encountered:
Another repro with two stored procedures that call eachother, same behavior:
SET max_sp_recursion_depth=255;
DROPTABLE IF EXISTS PEOPLE;
CREATETABLEPEOPLE (NAME VARCHAR(30));
DROP PROCEDURE IF EXISTS PROC_A;
DELIMITER //
CREATE PROCEDURE PROC_A(IN counter INT)
BEGINSET counter := counter +1;
IF counter >3 THEN
SELECT CONCAT('Ended in PROC_A with value ', counter) AS RESULT;
ELSE
CALL PROC_B(counter);
END IF;
END //
DELIMITER ;
DROP PROCEDURE IF EXISTS PROC_B;
DELIMITER //
CREATE PROCEDURE PROC_B(IN counter INT)
BEGINSET counter := counter +1;
IF counter >3 THEN
SELECT CONCAT('Ended in PROC_B with value ', counter) AS RESULT;
ELSE
CALL PROC_A(counter);
END IF;
END //
DELIMITER ;
CALL PROC_A(1);
Repro:
The text was updated successfully, but these errors were encountered: