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

Support trailing single line comments #63

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

Support trailing single line comments #63

flyway opened this issue Jun 25, 2013 · 13 comments

Comments

@flyway
Copy link
Collaborator

flyway commented Jun 25, 2013

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

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From business.axelfontaine.eu@googlemail.com on November 22, 2010 17:52:18
Hello Daniel,

Flyway's sql parser currently only supports single line comments that span the whole line (not trailing behind some other statement, or part of a statement).

As a workaround you can move your comment to the previous line. This will work and won't trip the parser.

I renamed this issue to reflect the missing parser feature. It is non-trivial to implement correctly though. MySQL supports both single and double quotes to delimit strings literals. These delimiters can then be escaped in various ways (double quote or preceding backslash). A potential implementation for this will need to carefully track all these things.

Can you let me know if this workaround worked for you?

If so, I'll update the documentation to make this limition clearer.

How critical are trailing single line comments for you?

Cheers,
Axel

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From dan...@danielgarcia.info on November 23, 2010 01:13:56
The workaround works for me.

Is there some documentation describing the work flow for developing flyway? I'd like to contribute changes to the parser. Moreover, is there a mailing list for this project?

Thanks,
Daniel

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From dan...@danielgarcia.info on November 23, 2010 01:18:49
Another behavior that I mentioned in the initial report was the stripping of new lines. This part if very important to me. Without new lines in stored procedure definitions, the stored procedures are unreadable.

Thanks,
Daniel

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From business.axelfontaine.eu@googlemail.com on November 23, 2010 10:43:09
Hi Daniel,

I've logged a separate issue for the newlines: http://code.google.com/p/flyway/issues/detail?id=65

Cheers,
Axel

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From business.axelfontaine.eu@googlemail.com on November 23, 2010 10:47:56
Hi Daniel,

I've logged 2 more issues for the

Cheers,
Axel

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From axel.fontaine.business@gmail.com on February 19, 2011 19:47:16
This issue was closed by revision 98c7b490b5.

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From axel.fontaine.business@gmail.com on February 19, 2011 19:50:27
From the looks of it, this has been fixed automatically as part of the fix for issue #65 (preserving new lines). I've expanded the test suite to verify this.

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From axel.fontaine.business@gmail.com on February 19, 2011 19:57:10
Better late than never: I've added you to the contributors list of Flyway for the patch you provided.

@flyway
Copy link
Collaborator Author

flyway commented Jun 25, 2013

From axel.fontaine.business@gmail.com on March 14, 2013 10:47:39
This problem seems to have resurfaced (see test case in issue #428).

@gemisigo
Copy link

Hi Axel,

What's the ETA for 5.2.0? Seeing that this issue has been dragging since 3.1, I guess it's not that important since it has a relatively easy workaround. What would you estimate the odds of it being fixed in 5.2.0?

@gemisigo
Copy link

gemisigo commented Sep 4, 2018

Ohh, I see. So this is gonna linger for a while...

@axelfontaine
Copy link
Contributor

Fixed. At last!

@vojtapol
Copy link

vojtapol commented Aug 14, 2019

This seems to me broken for me for MySQL # comments at the end of the line.

Edit: Nevermind, I am on 5.2.4 which explains why it's still not fixed in my version.

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