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

Block depth below 0 error in version 6.3.0 #2720

Closed
jamesball-inexus opened this issue Mar 13, 2020 · 3 comments
Closed

Block depth below 0 error in version 6.3.0 #2720

jamesball-inexus opened this issue Mar 13, 2020 · 3 comments

Comments

@jamesball-inexus
Copy link

@jamesball-inexus jamesball-inexus commented Mar 13, 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 (MySQL running in Linux Docker container)

What did you do?

Hi,

I have found the below migration crashes due to the following error: Flyway parsing bug: unable to decrease block depth below 0.

SQL with schema, table, variable names removed:

DROP EVENT [..].[..];

DELIMITER //
CREATE EVENT [..].[..]
ON SCHEDULE EVERY 1 SECOND STARTS CURRENT_TIMESTAMP()
ON COMPLETION PRESERVE
ENABLE
DO
[...]: BEGIN
    DECLARE [...] SMALLINT;

    DECLARE [...] DATE;

    SELECT
        s.[...],
        s.[...]
    FROM
        [...].[...] AS s
    WHERE
        s.[...] = 1
    INTO
        [...],
        [...];

    /*
     *  [...]
     */
    IF NOT EXISTS (
        SELECT
            NULL
        FROM
            [...].[...] AS rh
        WHERE
            rh.[...] = [...]
    ) THEN
        CALL [...].[...]([...], [...]);
    END IF;
END [...]//
DELIMITER ;
What did you expect to see?

THe migration executed successfully.

What did you see instead?

The migration was not executed due to the following error: Flyway parsing bug: unable to decrease block depth below 0.

@jamesball-inexus jamesball-inexus changed the title Unable to decrease block depth below 0 error in version 6.3.0 Block depth below 0 error in version 6.3.0 Mar 13, 2020
@MikielAgutu
Copy link
Contributor

@MikielAgutu MikielAgutu commented Mar 16, 2020

Can you see if this is fixed in 6.3.1?

@jamesball-inexus
Copy link
Author

@jamesball-inexus jamesball-inexus commented Mar 16, 2020

I have tested in 6.3.1 and the issue is still occurring.

@juliahayward
Copy link
Member

@juliahayward juliahayward commented Mar 23, 2020

Will be fixed in 6.3.2

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

4 participants