Closed
Conversation
If there is a semicolon within a single line comment "--", Npgsql assumes that it marks the end of a statement and starts the next statement (chunk) immediately after it, ignoring that this is still commented out. This commit ignores semicolons within single line comments.
glenebob
added a commit
that referenced
this pull request
Mar 29, 2014
Add test from issue #190, plus a couple more, to demonstrate rewriter broken by certain comments.
Contributor
|
Hi @bertl, I added your test, and a couple others, to the project. I then fixed the query re-writer to handle comments properly. So far, these changes are only in master. Please, if you would, grab the latest sources and see if my changes work for you. I expect this will be merged in 2.1 soon. Thanks! -Glen |
Author
|
Hi @glenebob, thanks for fixing this! Your change looks good and seems to work fine. Nice that you are now also "cutting" out block comments. Cheers! |
glenebob
added a commit
that referenced
this pull request
Apr 5, 2014
Add test from issue #190, plus a couple more, to demonstrate rewriter broken by certain comments (cherry picked from master).
Contributor
|
Fixed in master and 2.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If there is a semicolon within a single line comment "--", Npgsql
assumes that it marks the end of a statement and starts the next
statement (chunk) immediately after it, ignoring that this is still
commented out.
This commit ignores semicolons within single line comments.
I have created a test demonstrating the issue:
This will throw an exception although the command is valid (though meaningless in this case)