Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create stored procedure for MySql and MariaDB fails #2338

Closed
tcat2 opened this issue Mar 28, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@tcat2
Copy link

commented Mar 28, 2019

Which version and edition of Flyway are you using?

6.0.0-beta

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

command-line

Which database are you using (type & version)?

MySql 5,7

Which operating system are you using?

Win10 Pro 64

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
flyway migrate

What did you expect to see?

no errors

What did you see instead?

migration file where stored procedure is created and executed afterwards fails. Error: PROCEDURE xyz does not exist. Works fine with Flyway 5.2.4

@axelfontaine

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2019

Please share the smallest possible SQL file that reproduces this issue.

@tcat2

This comment has been minimized.

Copy link
Author

commented Apr 4, 2019

DROP PROCEDURE IF EXISTS reproduceError;
DELIMITER $$
 CREATE PROCEDURE reproduceError()
BEGIN
    SELECT 1;
 END$$
DELIMITER ;
CALL reproduceError();
DROP PROCEDURE IF EXISTS reproduceError;
@axelfontaine

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2019

Thank you very much for the clear test case. That was incredibly helpful in identifying the issue. It turned out we weren't handling custom delimiters correctly when they followed a keyword without a space. In your example it was END$$ that tripped up the parser. Fixed.

axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue Apr 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.