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
Problems parsing multiline insert (MySQL) #630
Comments
Here's unit test that demonstrates the bug:
multiline_insert.sql
|
Ok, tracked down the bug to the SqlStatmentBuilder. This will work - statement end is detected correctly:
This will not work - sql bulider thinks that this statement is not terminated:
Here's the unit test method:
|
Ok. I think this happens because SqlStatementBuilder incorrectly recognizes b' as a start of Bit-Field literal in string 'Paratyphoid fever b'. Method extractStringLiteralDelimitingTokens for line (6,'0022','Paratyphoid fever A','Paratyphoid fever b'); returns |
Knes1, you are correct that it is the b' that is causing the problem. Flyway is confused and thinks that you are trying to do a bitfield literal. I have already submitted a pull request for the fix which was accepted and is now on master. If you build from master HEAD you wont have the issue anymore. |
Hi bigslack, kind regards |
Commit * SHA: eeadacb resolves the issue. Current flyway/master has merged the commit so the next point release will have the fix. |
Duplicate of #593 |
Flyway 2.2.1 seems to have problem detecting the end of multiline insert statment.
This migration fails:
Migration seems to fail because FlyWay seems to merge two statements together (it didn't correctly detect the end of the first INSERT statement).
Here's the FlyWayException's error message:
I noticed this after I upgraded from version 2.0.3 to version 2.2.1. It was not happening in 2.0.3.
The text was updated successfully, but these errors were encountered: