I know that you specifically asked how to do this without a user-created variable - but for others who come across this thought, it would be wise to post how to do this with one, as it is quite simple:
CREATE PROCEDURE sp_recursive
BEGIN
// ... DECLAREs here
SET @@SESSION.max_sp_recursion_depth = 10;
SET @recursion_depth = IFNULL(@recursion_depth + 1, 0);
SET @recursion_depth = @recursion_depth - 1;
END
Explanation
An @recursion_depthextended session variable is incremented by following the above instructions SETwhen entering a stored procedure. At the first input, the variable is not initialized and therefore it matters NULL- it is checked for IFNULL(), which reassigns it in this case. At the end of the stored procedure just before the exit, the depth should be reduced.
Additional notes
It is worth noting that SQL Server provides a built-in variable @@NESTLEVELto accomplish the above, but unfortunately MySQL does not seem to have an equivalent.