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

SQL Parsing Error #480

Closed
flyway opened this issue Jun 25, 2013 · 2 comments
Closed

SQL Parsing Error #480

flyway opened this issue Jun 25, 2013 · 2 comments

Comments

@flyway
Copy link
Collaborator

flyway commented Jun 25, 2013

Original author: rajnish....@gmail.com (April 23, 2013 08:34:56)

Please refer attached SQL. While running the migration, flyway is throwing an error while processing the SQL file. I am running this script on MySQL server.

Although the SQL script contains two SQL lines, while parsing Flyway reads it as one line. Based on review of code, it seems that Flyway is incorrectly building the tokens from the first line.

The tokens array is populated as:

'2013-04-20 - QUOTE
13:55:17' - QUOTE
'INAUSPICIOUS. - QUOTE
"SUGGESTING - ALT QUOTE
UNPROMISING." - ALT QUOTE
"INAUSPICIOUS."' - ALT QUOTE
'INAUSPICIOUS.\NISN'T - QUOTE
"INAUSPICIOUS."' - QUOTE

Note that the word "INAUSPICIOUS."' is just being captured as Alt Quote. In fact, the Alt Quote should not get read as it is closing in the same word and a QUOTE should be added to capture the presence of single quote.

Thanks for looking into it. It is a great tool.

Regards,
Rajnish

Original issue: http://code.google.com/p/flyway/issues/detail?id=482

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From rajnish....@gmail.com on April 23, 2013 09:06:58
Adding correct SQL file

@bigslack
Copy link

This is related to #611 in which I have submitted a fix for (#613). I tested the example sql you attached and it appears to be handled correctly.

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

1 participant