mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #28037: Use sqlite3_get_autocommit() instead of setting Connection->inTransaction manually
Patch adapted from 9b79188edb
This commit is contained in:
parent
e7da2f8380
commit
59da4b324f
4 changed files with 20 additions and 27 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue