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
Labels

Comments

@ghost
Copy link
Collaborator

@ghost ghost 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

@ghost
Copy link
Collaborator Author

@ghost ghost commented Jun 25, 2013

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

@bigslack
Copy link

@bigslack bigslack commented Sep 26, 2013

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.