Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes from1 commit
Commits
Show all changes
22 commits
Select commitHold shift + click to select a range
c8bcf3b
Add tests
erlend-aaslandJun 8, 2022
d38e632
Modify pysqlite_check_remaining_sql to return char * iso. int
erlend-aaslandJun 8, 2022
7fcca68
Rename pysqlite_check_remaining_sql to lstrip_sql
erlend-aaslandJun 8, 2022
3061dc5
Use lstrip_sql() to strip comments and whitespace
erlend-aaslandJun 8, 2022
631f24d
Adjust comment
erlend-aaslandJun 8, 2022
8f29283
Explicit comparison
erlend-aaslandJun 8, 2022
a51cfe6
Add more tests
erlend-aaslandJun 8, 2022
bf0e150
Fix bug in lstrip parser
erlend-aaslandJun 8, 2022
5918fbe
Adjust NEWS
erlend-aaslandJun 8, 2022
b45e5b5
Make test more messy
erlend-aaslandJun 9, 2022
b0a7fbc
Address Ma Lin's review
erlend-aaslandJun 9, 2022
61a81eb
Reword comment
erlend-aaslandJun 9, 2022
e3fea31
Inline it
erlend-aaslandJun 9, 2022
d6ce75c
Further mess up messy test to increase code coverage
erlend-aaslandJun 9, 2022
7f7943f
Increase code coverage
erlend-aaslandJun 10, 2022
adcba2c
Merge branch 'main' into sqlite-rowcount/gh-79579-alt
erlend-aaslandJun 12, 2022
e5fafc7
Rewrite lstrip_sql by borrowing from SQLite's parser
erlend-aaslandJun 13, 2022
7d7a654
Test code nit
erlend-aaslandJun 13, 2022
2e638a0
Harden test_rowcount_prefixed_with_comment test
erlend-aaslandJun 13, 2022
b932e4f
Simplify one test
erlend-aaslandJun 13, 2022
ca053d7
Fix ret value for invalid comments
erlend-aaslandJun 13, 2022
c6fa9b2
Simplify
erlend-aaslandJun 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Make test more messy
  • Loading branch information
@erlend-aasland
erlend-aasland committedJun 9, 2022
commitb45e5b50fd71fce8e779550361662d91a03729cd
3 changes: 1 addition & 2 deletionsLib/test/test_sqlite3/test_dbapi.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -908,14 +908,13 @@ def test_rowcount_update_returning(self):

def test_rowcount_prefixed_with_comment(self):
# gh-79579: rowcount is updated even if query is prefixed with comments
#self.cu.execute("/* foo */ insert into test(name) values (?)", ('foo',))
self.cu.execute("""
-- foo
insert into test(name) values ('foo')
""")
self.assertEqual(self.cu.rowcount, 1)
self.cu.execute("""
/* -- messy /* /* *- *--
/* -- messy /* /* ** *- *--
*/
/* one more */ insert into test(name) values ('messy')
""")
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp