Skip to content
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

It looks like the following does the job: #143

Open
m0dul3 opened this issue Jan 4, 2022 · 2 comments
Open

It looks like the following does the job: #143

m0dul3 opened this issue Jan 4, 2022 · 2 comments

Comments

@m0dul3
Copy link

m0dul3 commented Jan 4, 2022

It looks like the following does the job:

diff --git a/src/connection.c b/src/connection.c
index 9ca3afa..e61da6f 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1578,6 +1578,10 @@ pysqlite_connection_exit(pysqlite_Connection* self, PyObject* args)

     result = PyObject_CallMethod((PyObject*)self, method_name, "");
     if (!result) {
+        result = PyObject_CallMethod((PyObject*)self, "rollback", "");
+        if (result) {
+            Py_DECREF(result);
+        }
         return NULL;
     }
     Py_DECREF(result);

Originally posted by @lciti in #103 (comment)

@ghaering
Copy link
Owner

Do you still know which problem this solved?

@erlend-aasland
Copy link

Do you still know which problem this solved?

It looks like a simplified variant of python/cpython#26202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants