Issue #28037: Use sqlite3_get_autocommit() instead of setting Connection->inTransaction manually

Patch adapted from 9b79188edb
This commit is contained in:
Berker Peksag 2016-09-12 07:16:43 +03:00
parent e7da2f8380
commit 59da4b324f
4 changed files with 20 additions and 27 deletions

View file

@ -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);