This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author palaviv
Recipients berker.peksag, fschulze, ghaering, jaraco, palaviv, serhiy.storchaka, socketpair, xiang.zhang
Date 2016-10-31.17:07:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I looked into this error and I think the problem is the sqlite3_stmt_readonly check in _pysqlite_query_execute (cursor.c line 517):

    if (self->connection->begin_statement && !sqlite3_stmt_readonly(self->statement->st) && !self->statement->is_ddl) {
        if (sqlite3_get_autocommit(self->connection->db)) {
            result = _pysqlite_connection_begin(self->connection);
            if (!result) {
                goto error;

As you can see we check if the current statement is not readonly and if so we start a transaction. The problem is that sqlite3_stmt_readonly return false for the "begin immediate" statement. When this happens we open a transaction with _pysqlite_connection_begin and then executing the "begin immediate".

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,"
Date User Action Args
2016-10-31 17:07:36palavivsetrecipients: + palaviv, ghaering, jaraco, socketpair, berker.peksag, serhiy.storchaka, xiang.zhang, fschulze
2016-10-31 17:07:36palavivsetmessageid: <>
2016-10-31 17:07:36palavivlinkissue28518 messages
2016-10-31 17:07:35palavivcreate