2👍
As mentioned in comment of here,
The delimiter is used only by mysql client (not on API, driver ... etc).
So, it won't work.
I encountered similar problem when using db.execute(sql_file) using south (for my django migration) where my sql_file had
DROP PROCEDURE IF EXIATS ....
DELIMITER //
CREATE PROCEDURE ....
BEGIN
....
END
...
I removed the DROP and DELIMITER bits, and added ‘label‘ to the procedure creation and it works for me:
CREATE PROCEDURE xxxx
label: BEGIN
....
;
END label
Source:stackexchange.com