From 59da4b324f08247d389a4c89e1e84243f41c489f Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 12 Sep 2016 07:16:43 +0300 Subject: Issue #28037: Use sqlite3_get_autocommit() instead of setting Connection->inTransaction manually Patch adapted from https://github.com/ghaering/pysqlite/commit/9b79188edbc50faa24dc178afe24a10454f3fcad --- Modules/_sqlite/cursor.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'Modules/_sqlite/cursor.c') diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 020f93107e..c7169f6d6e 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -644,15 +644,6 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* } error: - /* just to be sure (implicit ROLLBACKs with ON CONFLICT ROLLBACK/OR - * ROLLBACK could have happened */ - #ifdef SQLITE_VERSION_NUMBER - #if SQLITE_VERSION_NUMBER >= 3002002 - if (self->connection && self->connection->db) - self->connection->inTransaction = !sqlite3_get_autocommit(self->connection->db); - #endif - #endif - Py_XDECREF(parameters); Py_XDECREF(parameters_iter); Py_XDECREF(parameters_list); -- cgit v1.2.1