GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.10] gh-79579: Improve DML query detection in sqlite3 (GH-93623) by erlend-aasland · Pull Request #93801 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Jun 14, 2022

Copy link
Copy Markdown
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 [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@erlend-aasland
[3.10] pythongh-79579: Improve DML query detection in sqlite3 (python…
84423c9
…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 <[email protected]>
@erlend-aasland
erlend-aasland requested a review from berkerpeksag as a code owner June 14, 2022 12:09
@bedevere-bot bedevere-bot mentioned this pull request Jun 14, 2022
gh-79579: Improve DML query detection in sqlite3 #93623
Merged
@bedevere-bot bedevere-bot added the awaiting core review label Jun 14, 2022
@erlend-aasland erlend-aasland mentioned this pull request Jun 14, 2022
SQLite incorrect row count for UPDATE #79579
Closed
Erlend Egeberg Aasland added 2 commits June 14, 2022 14:14
Erlend Egeberg Aasland
Update statement.c
a2f3acb
Erlend Egeberg Aasland
Update statement.c
2f29880
@erlend-aasland erlend-aasland mentioned this pull request Jun 14, 2022
Modified statements in "before_cursor_executes" break SQLite update assertions w/ declarative_base [1.2.14] sqlalchemy/sqlalchemy#4396
Closed
@erlend-aasland
erlend-aasland merged commit 2229d34 into python:3.10 Jun 14, 2022
@bedevere-bot bedevere-bot removed the awaiting core review label Jun 14, 2022
@erlend-aasland
erlend-aasland deleted the backport-4674007-3.10 branch June 14, 2022 13:05
@erlend-aasland erlend-aasland mentioned this pull request Jul 19, 2022
[3.10] gh-94998: Remove incorrectly backported Lib/test/test_sqlite3 directory #95016
Merged
erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 19, 2022
@erlend-aasland
[3.10] pythongh-94998: Remove incorrectly backported Lib/test/test_sq…
d2363a2
…lite3 directory

The directory was incorrectly partially backported in commit 2229d34
(See pythongh-93801)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag berkerpeksag is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@erlend-aasland @bedevere-bot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.