cpython/Modules/_sqlite
Erlend Egeberg Aasland 871b1dc469
[3.11] gh-79579: Improve DML query detection in sqlite3 (GH-93623) (#93800)
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 46740073ef)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-14 14:49:22 +02:00
..
clinic [3.11] gh-93044: No longer convert the database argument of sqlite3.connect() to bytes (GH-93046) (GH-93048) 2022-05-21 16:53:58 +03:00
blob.c gh-92019: Make sqlite3.Blob indexing conform with the norm (#92020) 2022-04-30 09:01:37 -06:00
blob.h gh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680) 2022-04-14 17:02:56 -07:00
connection.c gh-92434: Silence compiler warning in Modules/_sqlite/connection.c on 32-bit systems (GH-93090) 2022-06-10 01:37:38 -07:00
connection.h gh-92206: Improve scoping of sqlite3 register cursor helper (#92212) 2022-05-03 06:33:24 -06:00
cursor.c gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (GH-93526) 2022-06-08 04:07:15 -07:00
cursor.h bpo-44092: Remove unused member `reset` from `sqlite3.Cursor` (GH-30377) 2022-01-03 15:47:16 -08:00
microprotocols.c bpo-46541: Replace _Py_IDENTIFIER with _Py_ID in sqlite3 (GH-31351) 2022-02-17 00:24:44 +09:00
microprotocols.h bpo-42064: Convert `sqlite3` global state to module state (GH-29073) 2021-10-27 13:12:21 +02:00
module.c [3.11] gh-93044: No longer convert the database argument of sqlite3.connect() to bytes (GH-93046) (GH-93048) 2022-05-21 16:53:58 +03:00
module.h gh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680) 2022-04-14 17:02:56 -07:00
prepare_protocol.c bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) 2021-06-17 11:06:09 +01:00
prepare_protocol.h Remove unused UNKNOWN macros from cursor.h and prepare_protocol.h (GH-27885) 2021-08-22 22:23:45 +09:00
row.c bpo-42064: Convert `sqlite3` global state to module state (GH-29073) 2021-10-27 13:12:21 +02:00
row.h bpo-42064: Remove stale extern declarations in `sqlite3` headers (GH-26840) 2021-06-23 21:06:53 +09:00
statement.c [3.11] gh-79579: Improve DML query detection in sqlite3 (GH-93623) (#93800) 2022-06-14 14:49:22 +02:00
statement.h gh-92206: Improve scoping of sqlite3 statement helper (#92260) 2022-05-03 16:07:11 -06:00
util.c gh-89022: Improve sqlite3 exceptions related to binding params and API misuse (#91572) 2022-05-04 07:16:01 -06:00
util.h gh-92206: Move pysqlite_step() to Modules/_sqlite/cursor.c (#92207) 2022-05-02 21:45:04 -06:00