'Delimeter not working, "Syntax" errors when running .sql from shell
I'm trying to make a simple stored procedure... After exploring a bit, I discover I can't make any procedure at all, not even the simplest. For exemple, running this specific procedure from the documentation:
DELIMETER ;
DROP PORCEDURE IF EXISTS sp_dorepeat
DELIMETER //
CREATE PROCEDURE sp_dorepeat(p1 INT)
BEGIN
SET @x = 0;
REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT;
END //
DELIMETER ;
Which is basically the same syntax error on every line. Changing the $$ for // also doesn't have any effect, as suggested here.
It's worth knowing that I'm running the shell as root, so there are no restrictions. Is there anything wrong with my code? The database is mysql 8.0
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

