6.2.3 Community
(Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Works fine in 6.2.2
Java API
MySQL/Aurora (MySQL in dev/Aurora in staging, both have issue)
macOS Catalina in dev, Alpine in staging - both have issue
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Trying to run a migration with CREATE TABLE IF EXISTS statement
Expected table to be created
Exception thrown when running migrations:
org.flywaydb.core.api.FlywayException: Unable to parse statement in db/migration/...sql at line 1 col 1: Incomplete statement at line 1 col 1: CREATE TABLE IF NOT EXISTS
Duplicate of https://github.com/flyway/flyway/issues/2675
This regression has been fixed, and will be released in 6.2.4, later this week.
I'll leave this open for now to collate other duplicate reports into one issue.
Another example that fails with 6.2.3, works with 6.2.2 and with mysql client/cli.
State: HY000 - Error Code: 1681)
ERROR: Unable to parse statement in db/flyway/sql/V005__add_adjacency_team.sql at line 9 col 1: Incomplete statement at line 9 col 1: set @query = IF(@exist <= 0,
'ALTER TABLE `teams` ADD COLUMN `parent_team_id` int(10) unsigned DEFAULT NULL AFTER `type`;',
'select \'Column Exists\' status');
prepare stmt from @query;
EXECUTE stmt;
Full script is :
SELECT count(*)
INTO @exist
FROM information_schema.columns
WHERE table_schema = database()
and COLUMN_NAME = 'parent_team_id'
AND table_name = 'teams';
set @query = IF(@exist <= 0,
'ALTER TABLE `teams` ADD COLUMN `parent_team_id` int(10) unsigned DEFAULT NULL AFTER `type`;',
'select \'Column Exists\' status');
prepare stmt from @query;
EXECUTE stmt;
@lakamsani That should also be fixed in 6.2.4
Most helpful comment
Duplicate of https://github.com/flyway/flyway/issues/2675
This regression has been fixed, and will be released in 6.2.4, later this week.
I'll leave this open for now to collate other duplicate reports into one issue.