-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-33376: clear cursor->statement when setting cursor->reset #10250
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
Conversation
When statements and cursors are reset as a result of a connection rollback, their associated statements are not cleared. This can lead to spurious statement resets when referencing cursors created before the rollback.
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
| elif counter == 1: | ||
| self.assertEqual(row[0], 1) | ||
| elif counter == 2: | ||
| self.assertEqual(row[0], 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not self.assertEqual(row[0], counter)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the previous, very similar unit test. I don't have particularly strong opinions either way, but I generally value correctness > consistency > style.
I can change it if others feel strongly about this.
|
Hi @cyang1, thanks for fixing this! Please address the remark from the code review : |
|
https://bugs.python.org/issue33376 is closed. What is the status of this PR? |
This change is obsolete. The "offending" code is no longer there. I say we can close this. |
When statements and cursors are reset as a result of a connection
rollback, their associated statements are not cleared. This can lead to
spurious statement resets when referencing cursors created before the
rollback.
https://bugs.python.org/issue33376