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 · 4 comments
Closed

Create stored procedure for MySql and MariaDB fails #2338

tcat2 opened this issue Mar 28, 2019 · 4 comments

Comments

@tcat2
Copy link

@tcat2 tcat2 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
Copy link
Contributor

@axelfontaine axelfontaine commented Apr 4, 2019

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

@tcat2
Copy link
Author

@tcat2 tcat2 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
Copy link
Contributor

@axelfontaine axelfontaine 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
@axelfontaine axelfontaine removed this from the Flyway 6.0.0 milestone May 22, 2019
@axelfontaine axelfontaine added this to the Flyway 6.0.0-beta2 milestone May 22, 2019
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants