-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-79579: Improve DML query detection in sqlite3 #93623
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
Merged
erlend-aasland
merged 22 commits into
python:main
from
erlend-aasland:sqlite-rowcount/gh-79579-alt
Jun 14, 2022
Merged
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c8bcf3b
Add tests
erlend-aasland d38e632
Modify pysqlite_check_remaining_sql to return char * iso. int
erlend-aasland 7fcca68
Rename pysqlite_check_remaining_sql to lstrip_sql
erlend-aasland 3061dc5
Use lstrip_sql() to strip comments and whitespace
erlend-aasland 631f24d
Adjust comment
erlend-aasland 8f29283
Explicit comparison
erlend-aasland a51cfe6
Add more tests
erlend-aasland bf0e150
Fix bug in lstrip parser
erlend-aasland 5918fbe
Adjust NEWS
erlend-aasland b45e5b5
Make test more messy
erlend-aasland b0a7fbc
Address Ma Lin's review
erlend-aasland 61a81eb
Reword comment
erlend-aasland e3fea31
Inline it
erlend-aasland d6ce75c
Further mess up messy test to increase code coverage
erlend-aasland 7f7943f
Increase code coverage
erlend-aasland adcba2c
Merge branch 'main' into sqlite-rowcount/gh-79579-alt
erlend-aasland e5fafc7
Rewrite lstrip_sql by borrowing from SQLite's parser
erlend-aasland 7d7a654
Test code nit
erlend-aasland 2e638a0
Harden test_rowcount_prefixed_with_comment test
erlend-aasland b932e4f
Simplify one test
erlend-aasland ca053d7
Fix ret value for invalid comments
erlend-aasland c6fa9b2
Simplify
erlend-aasland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Library/2022-06-06-12-58-27.gh-issue-79579.e8rB-M.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
:mod:`sqlite3` now correctly detects DML queries, even when prefixed with | ||
comments. Patch by Erlend E. Aasland. | ||
erlend-aasland marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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.
Uh oh!
There was an error while loading. Please reload this page.