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

Flyway does not execute SQL in a migration to create a MySQL procedure when it contains DROP TABLE IF EXISTS #2707

Closed
jamesball-inexus opened this issue Mar 5, 2020 · 1 comment
Assignees
Milestone

Comments

@jamesball-inexus
Copy link

jamesball-inexus commented Mar 5, 2020

Which version and edition of Flyway are you using?

6.3.0

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

n/a

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

Gradle plugin

Which database are you using (type & version)?

MySQL 8.0.19

Which operating system are you using?

Windows 10

What did you do?

Flyway does not execute the SQL in a migration to create a procedure that drops a table if IF EXISTS is included in the DROP TABLE statement.

DELIMITER //
CREATE PROCEDURE drop_table_test ()
SQL SECURITY INVOKER
drop_table_test: BEGIN
    DROP TABLE IF EXISTS test;
END drop_table_test //
DELIMITER ;
What did you expect to see?

The procedure drop_table_test is created.

What did you see instead?

The procedure drop_table_test is not created.

@Lyeeedar Lyeeedar self-assigned this Mar 5, 2020
@juliahayward juliahayward added this to the Flyway 6.3.1 milestone Mar 9, 2020
@Lyeeedar
Copy link
Contributor

Lyeeedar commented Mar 11, 2020

Fixed in c229730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants