[issue36859] sqlite3 dml statement detection does not account for CTEs

2021-08-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: See also bpo-35398 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue36859] sqlite3 dml statement detection does not account for CTEs

2021-02-09 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23282 pull_request: https://github.com/python/cpython/pull/24492 ___ Python tracker ___ __

[issue36859] sqlite3 dml statement detection does not account for CTEs

2021-02-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Thanks, Charles. I'll give it a shot and see if get can provoke a response :) -- ___ Python tracker ___ _

[issue36859] sqlite3 dml statement detection does not account for CTEs

2021-02-09 Thread Charles
Charles added the comment: Yeah, go for it erlendaasland - I abandoned all hope of getting it merged, and have just been maintaining my own pysqlite3 which simplifies my life greatly. -- ___ Python tracker

[issue36859] sqlite3 dml statement detection does not account for CTEs

2021-02-09 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I believe GH-13216 would be an improvement. I see that your original branch is unavailable, Charles; would you mind if I cherry-picked it and rebased it onto master? The sqlite3 module now requires SQLite >= 3.7.15 which simplifies the change a lot.

[issue36859] sqlite3 dml statement detection does not account for CTEs

2020-05-28 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-09 Thread Ma Lin
Change by Ma Lin : -- nosy: +Ma Lin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles
Change by Charles : -- pull_requests: +13127 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: CPython now accepts PRs on GitHub. Please try raising a PR as per devuguide : https://devguide.python.org/ -- nosy: +berker.peksag, xtreak versions: +Python 3.8 ___ Python tracker

[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles
Charles added the comment: I've got a patch working now that: - retains complete backwards-compatibility for DDL (as well as BEGIN EXCLUSIVE/IMMEDIATE) -- tests are passing locally. - retains previous behavior for old sqlite that do not have the sqlite3_stmt_readonly API. I think this shoul

[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles
Charles added the comment: Oh, one more thing that is actually quite important -- since BEGIN IMMEDIATE and BEGIN EXCLUSIVE "modify" the database, these statements (intended to begin a transaction) are treated as "is_dml" when using the sqlite3_stmt_readonly API. --

[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles
Charles added the comment: Sqlite since 3.7.11 provides sqlite3_stmt_readonly() API for determining if a prepared statement will affect the database. I made the change, removing the SQL scanning code and replacing it with: self->is_dml = !sqlite3_stmt_readonly(self->st); But then I see a nu

[issue36859] sqlite3 dml statement detection does not account for CTEs

2019-05-08 Thread Charles
New submission from Charles : In statement.c, there is some logic which detects whether or not an incoming statement is a DML-type. The logic, as of 2019-05-08, I am referring to is here: https://github.com/python/cpython/blob/fc662ac332443a316a120fa5287c235dc4f8739b/Modules/_sqlite/statement