gh-79579: Improve DML query detection in sqlite3 by erlend-aasland · Pull Request #93623 · python/cpython · GitHub

github.com

Tin mới

erlend-aasland:sqlite-rowcount/gh-79579-alt

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Modify pysqlite_check_remaining_sql to return char * iso. int

Rename pysqlite_check_remaining_sql to lstrip_sql

Use lstrip_sql() to strip comments and whitespace

Explicit comparison

Fix bug in lstrip parser

awaiting core review

awaiting core review

SQLite incorrect row count for UPDATE #79579

needs backport to 3.10

needs backport to 3.10

needs backport to 3.11

needs backport to 3.11

gh-79579: Update sqlite3.Cursor.rowcount for all data-modifying queries #93532

View reviewed changes

🔨 test-with-buildbots

🔨 test-with-buildbots

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

Make test more messy

Address Ma Lin's review

View reviewed changes

https://github.com/sqlite/sqlite/blob/37d4ec86bfa78c31732132b7729b8ce0e47da891/src/complete.c#L170-L178

In current code, this code can't be processed correctly.

https://github.com/sqlite/sqlite/blob/4baf43ff647ab8c6752e7fdd12efd1a979afd476/ext/rbu/sqlite3rbu.c#L2287-L2289

In current code, this code can't be processed correctly.

Merge branch 'main' into sqlite-rowcount/

Rewrite lstrip_sql by borrowing from SQLite's parser

Harden test_rowcount_prefixed_with_comment test

Fix ret value for invalid comments

: Improve DML query detection in sqlite3 (

: Improve DML query detection in sqlite3 (

: Improve DML query detection in sqlite3 (

Modified statements in "before_cursor_executes" break SQLite update assertions w/ declarative_base [1.2.14] sqlalchemy/sqlalchemy#4396

: Improve DML query detection in sqlite3 (

Revert 30935 defer bpo45162 to 312 (

emscripten-core/emscripten#17269

https://github.com/python/cpython/issue/89336