Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,7 @@ pysqlite_connection_call(pysqlite_Connection *self, PyObject *args,
statement->in_weakreflist = NULL;

rc = pysqlite_statement_create(statement, self, sql);
PyObject_GC_Track(statement);
if (rc != SQLITE_OK) {
if (rc == PYSQLITE_TOO_MUCH_SQL) {
PyErr_SetString(pysqlite_Warning, "You can only execute one statement at a time.");
Expand Down
1 change: 1 addition & 0 deletions Modules/_sqlite/cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* operation
goto error;
}
rc = pysqlite_statement_create(self->statement, self->connection, operation);
PyObject_GC_Track(self->statement);
if (rc != SQLITE_OK) {
Py_CLEAR(self->statement);
goto error;
Expand Down