diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-09-12 04:16:43 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-09-12 04:16:43 (GMT) |
commit | 59da4b324f08247d389a4c89e1e84243f41c489f (patch) | |
tree | f82798f28c4b1e3a157a0375c31579b871491408 /Modules/_sqlite/cursor.c | |
parent | e7da2f8380fbd92d5978e9fb8ce317ecfd17d12e (diff) | |
download | cpython-59da4b324f08247d389a4c89e1e84243f41c489f.zip cpython-59da4b324f08247d389a4c89e1e84243f41c489f.tar.gz cpython-59da4b324f08247d389a4c89e1e84243f41c489f.tar.bz2 |
Issue #28037: Use sqlite3_get_autocommit() instead of setting Connection->inTransaction manually
Patch adapted from https://github.com/ghaering/pysqlite/commit/9b79188edbc50faa24dc178afe24a10454f3fcad
Diffstat (limited to 'Modules/_sqlite/cursor.c')
-rw-r--r-- | Modules/_sqlite/cursor.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 020f931..c7169f6 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); |