Skip to content

Conversation

@erlend-aasland
Copy link
Contributor

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 4674007)

Co-authored-by: Erlend Egeberg Aasland erlend.aasland@protonmail.com

…GH-93623) 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 4674007) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
@erlend-aaslanderlend-aasland merged commit 2229d34 into python:3.10Jun 14, 2022
@erlend-aaslanderlend-aasland deleted the backport-4674007-3.10 branch June 14, 2022 13:05
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 19, 2022
…lite3 directory The directory was incorrectly partially backported in commit 2229d34 (See pythongh-93801)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@erlend-aasland@bedevere-bot