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
In MySQL migrations, it is typical to set the value of the delimiter to a different value than ; when creating a stored procedure. The official docs even recommend doing this.
However, when trying to use such a migration with migrate, it results in an error:
DELIMITER ; (details: 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 ^
CREATE PROCEDURE myProcedure()
Other delimiters likewise fail (tested with // and FOOBAR).
Steps to Reproduce
Steps to reproduce the behavior:
Create a migration like:
DELIMITER ^
CREATE PROCEDURE myProcedure()
BEGIN
END^
DELIMITER ;
Run migrate
See error.
Expected Behavior migrate should run the migration correctly with no errors.
As a workaround, I found that you can add multiStatements=true to the connection string. Then, procedures can be created without the use of the delimiter:
Describe the Bug
In MySQL migrations, it is typical to set the value of the delimiter to a different value than
;
when creating a stored procedure. The official docs even recommend doing this.However, when trying to use such a migration with
migrate
, it results in an error:Other delimiters likewise fail (tested with
//
andFOOBAR
).Steps to Reproduce
Steps to reproduce the behavior:
Expected Behavior
migrate
should run the migration correctly with no errors.Migrate Version
4.17.0
Loaded Source Drivers
go-bindata, file, github, github-ee, godoc-vfs, s3, gcs, gitlab, bitbucket
Loaded Database Drivers
clickhouse, cockroach, crdb-postgres, yugabyte, ysql, neo4j, stub, firebird, cassandra, mysql, redshift, yugabytedb, sqlserver, pgx, pgx4, postgresql, mongodb+srv, spanner, firebirdsql, pgx5, cockroachdb, postgres, rqlite, mongodb
Go Version
n/a
Stacktrace
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: