Big Stone added the comment: Comment kindly provided by D. Richard Hipp himself: """"" I don't have a login for the python bug tracker so I cannot comment there. But I think I see the problem. This is as Aviv Polivoda remarks at https://bugs.python.org/issue28518#msg279808
I think this is a error in sqlite as the documentation says: "ransaction control statements such as BEGIN, COMMIT, ROLLBACK, SAVEPOINT, and RELEASE cause sqlite3_stmt_readonly() to return true," Except it is not a bug in SQLite, but rather an ambiguity in the documentation. In his quote, Aviv omitted the second clause from the documentation: "since the statements themselves do not actually modify the database but rather they control the timing of when other statements modify the database." (Full text here: https://www.sqlite.org/c3ref/stmt_readonly.html) For a plain BEGIN statement, there are no changes to the database file, so sqlite3_stmt_readonly() does indeed return TRUE. But for a BEGIN IMMEDIATE statement, there are database changes, because the extra IMMEDIATE keyword causes the statement to go ahead and start transaction "immediately". So technically, the documentation is correct, though I can certainly understand that it is misleading and ambiguous as currently worded. Clarification will be checked in shortly and will appear in the 3.16.0 release. Note also that behavior of sqlite3_stmt_readonly() has not changed since that interface was first added for the 3.7.5 release on 2011-02-01. So this is not an SQLite regression. Rather, I presume that Python has recently started using the sqlite3_stmt_readonly() interface in a new way. -- D. Richard Hipp d...@sqlite.org """"" ---------- nosy: +Big Stone _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28518> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com