diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2022-06-14 13:05:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 13:05:36 (GMT) |
commit | 2229d34a6ef9c03e476882f46bba4d7c83552d1e (patch) | |
tree | a699290af00f9bedf002fc4af83fbf152eb10193 /Misc | |
parent | f9585e2adc36fb2886f96ef86a5aa14215fc1151 (diff) | |
download | cpython-2229d34a6ef9c03e476882f46bba4d7c83552d1e.zip cpython-2229d34a6ef9c03e476882f46bba4d7c83552d1e.tar.gz cpython-2229d34a6ef9c03e476882f46bba4d7c83552d1e.tar.bz2 |
[3.10] gh-79579: Improve DML query detection in sqlite3 (GH-93623) (#93801)
The fix involves using pysqlite_check_remaining_sql(), not only to check
for multiple statements, but now also to strip leading comments and
whitespace from SQL statements, so we can improve DML query detection.
pysqlite_check_remaining_sql() is renamed lstrip_sql(), to more
accurately reflect its function, and hardened to handle more SQL comment
corner cases.
(cherry picked from commit 46740073ef32bf83964c39609c7a7a4772c51ce3)
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-06-06-12-58-27.gh-issue-79579.e8rB-M.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-06-06-12-58-27.gh-issue-79579.e8rB-M.rst b/Misc/NEWS.d/next/Library/2022-06-06-12-58-27.gh-issue-79579.e8rB-M.rst new file mode 100644 index 0000000..82b1a1c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-06-06-12-58-27.gh-issue-79579.e8rB-M.rst @@ -0,0 +1,2 @@ +:mod:`sqlite3` now correctly detects DML queries with leading comments. +Patch by Erlend E. Aasland. |