From 86a670543ff97d52fd9b8ca0477f8b6d27ee946d Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Fri, 3 Mar 2017 12:58:17 +0200 Subject: bpo-9303: Migrate sqlite3 module to _v2 API to enhance performance (#359) --- Modules/_sqlite/cursor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Modules/_sqlite/cursor.c') diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 8341fb8480..ba6e52db56 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -548,8 +548,10 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* /* If it worked, let's get out of the loop */ break; } +#if SQLITE_VERSION_NUMBER < 3003009 /* Something went wrong. Re-set the statement and try again. */ rc = pysqlite_statement_reset(self->statement); +#endif if (rc == SQLITE_SCHEMA) { /* If this was a result of the schema changing, let's try again. */ @@ -706,7 +708,7 @@ PyObject* pysqlite_cursor_executescript(pysqlite_Cursor* self, PyObject* args) while (1) { Py_BEGIN_ALLOW_THREADS - rc = sqlite3_prepare(self->connection->db, + rc = SQLITE3_PREPARE(self->connection->db, script_cstr, -1, &statement, -- cgit v1.2.1