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 upgraded from 7.4.0 to 7.14.0 - failing for HSQLDB on "DROP FUNCTION XXX IF EXISTS" #3258

Closed
JaspreetSinghJassal opened this issue Aug 23, 2021 · 3 comments

Comments

@JaspreetSinghJassal
Copy link

JaspreetSinghJassal commented Aug 23, 2021

Which version and edition of Flyway are you using?

Flyway community edition 7.14.0

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)

Maven-plugin

Which database are you using? (Type & version)

HSQLDB --> org.hsqldb:hsqldb:2.4.1

Which operating system are you using?

Windows and Linux

What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)

Updated flyway from 7.4.0 to 7.14.0

The following script which worked fine before, started failing:

drop function to_valid_date if exists;
create function to_valid_date(d varchar(8)) returns date
BEGIN atomic
  declare continue handler for sqlexception return null;
  return to_date(d, 'YYYYMMDD');
END;
What did you expect to see?

Successful migration

What did you see instead?

Seems like the if exists part is causing the problem as it works fine without - but I can of course not skip that part in my particular sql-migration

org.flywaydb.core.api.FlywayException: Unable to parse statement in V500_000__helper_functions.sql at line 1 col 1. 
See https://rd.gt/3ipi7Pm for more information: Incomplete statement at line 1 col 1: drop function to_valid_date if exists;
[ERROR] BEGIN atomic
[ERROR]   declare continue handler for sqlexception return null;
[ERROR]   return to_date(d, 'YYYYMMDD');
[ERROR] END;
[ERROR]
@JaspreetSinghJassal JaspreetSinghJassal changed the title Flyway upgraded from 7.4.0 to 7.14.0 - started failing for HSQLDB on "DROP FUNCTION XXX IF EXISTS" Flyway upgraded from 7.4.0 to 7.14.0 - failing for HSQLDB on "DROP FUNCTION XXX IF EXISTS" Aug 24, 2021
@MikielAgutu MikielAgutu added this to the Flyway 7.x milestone Aug 24, 2021
@JaspreetSinghJassal
Copy link
Author

JaspreetSinghJassal commented Aug 26, 2021

Clicked on the "Close issue"-button by mistake, hence reopnened.

@JaspreetSinghJassal
Copy link
Author

Any tentative ETA, @MikielAgutu?

@DoodleBobBuffPants
Copy link
Contributor

Closing as we have a fix in our pipeline to be merged some time today

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