Skip to content

bpo-43294: Remove unused variables in sqlite3 transaction control functions #24658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
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
10 changes: 4 additions & 6 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,11 @@ int pysqlite_check_connection(pysqlite_Connection* con)
PyObject* _pysqlite_connection_begin(pysqlite_Connection* self)
{
int rc;
const char* tail;
sqlite3_stmt* statement;

Py_BEGIN_ALLOW_THREADS
rc = sqlite3_prepare_v2(self->db, self->begin_statement, -1, &statement, &tail);
rc = sqlite3_prepare_v2(self->db, self->begin_statement, -1, &statement,
NULL);
Py_END_ALLOW_THREADS

if (rc != SQLITE_OK) {
Expand Down Expand Up @@ -411,7 +411,6 @@ pysqlite_connection_commit_impl(pysqlite_Connection *self)
/*[clinic end generated code: output=3da45579e89407f2 input=39c12c04dda276a8]*/
{
int rc;
const char* tail;
sqlite3_stmt* statement;

if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
Expand All @@ -421,7 +420,7 @@ pysqlite_connection_commit_impl(pysqlite_Connection *self)
if (!sqlite3_get_autocommit(self->db)) {

Py_BEGIN_ALLOW_THREADS
rc = sqlite3_prepare_v2(self->db, "COMMIT", -1, &statement, &tail);
rc = sqlite3_prepare_v2(self->db, "COMMIT", -1, &statement, NULL);
Py_END_ALLOW_THREADS
if (rc != SQLITE_OK) {
_pysqlite_seterror(self->db, NULL);
Expand Down Expand Up @@ -461,7 +460,6 @@ pysqlite_connection_rollback_impl(pysqlite_Connection *self)
/*[clinic end generated code: output=b66fa0d43e7ef305 input=12d4e8d068942830]*/
{
int rc;
const char* tail;
sqlite3_stmt* statement;

if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
Expand All @@ -472,7 +470,7 @@ pysqlite_connection_rollback_impl(pysqlite_Connection *self)
pysqlite_do_all_statements(self, ACTION_RESET, 1);

Py_BEGIN_ALLOW_THREADS
rc = sqlite3_prepare_v2(self->db, "ROLLBACK", -1, &statement, &tail);
rc = sqlite3_prepare_v2(self->db, "ROLLBACK", -1, &statement, NULL);
Py_END_ALLOW_THREADS
if (rc != SQLITE_OK) {
_pysqlite_seterror(self->db, NULL);
Expand Down