MySQL driver doesn't support DELIMITER statement #375
Replies: 8 comments
-
This doesn't seem like an issue with stored procedures, the error message coming directly from mysql appears to be related to the delimiter syntax. What happens if you execute this script directly using the mysql command? |
Beta Was this translation helpful? Give feedback.
-
I'm running into this as well. Works perfectly in MySQL workbench, but fails in Ultimately we were trying to change the |
Beta Was this translation helpful? Give feedback.
-
I think it's probably an issue coming from the go MySQL driver. It might be ignoring the delimiter syntax and trying to send the whole statement through to MySQL. |
Beta Was this translation helpful? Give feedback.
-
I've just googled a bit and this seems to be a feature of the MySQL command line client and various other tools. It's not part of the SQL spec that a MySQL server understands, so this might be out of scope for |
Beta Was this translation helpful? Give feedback.
-
I'm also facing the same issue. How soon this get resolved? @amacneil I'm trying to run this file/migration. any solution for this?
Error
|
Beta Was this translation helpful? Give feedback.
-
Unfortunate response: go-sql-driver/mysql#351
|
Beta Was this translation helpful? Give feedback.
-
I'm also facing the same issue. How soon this get resolved? You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near delimiter $$ |
Beta Was this translation helpful? Give feedback.
-
I doubt we're looking at this one getting resolved, @zionsky79, the workaround here is to rewrite your queries so that you don't need to use the |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to migrate stored procedures with dbmate but seems like it doesn't support it. I am getting below error while executing dbmate up command:
sql file content for stored procedure:
DELIMITER //
DROP PROCEDURE IF EXISTS foobar //
create procedure foobar (in var1 int)
begin select var1 + 2 as result;
END //
DELIMITER ;
ERROR:
Applying: 20180907100150_create_store_procedure.sql
Error: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER //
DROP PROCEDURE IF EXISTS foobar //
create procedure foobar (in var1' at line 1
Beta Was this translation helpful? Give feedback.
All reactions