-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-142787: Fix assertion failure in sqlite3 blob slice #142824
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for working on this! Please make sure this regression is covered by the test suite. |
|
Hi, there is a duplicated news entry, please remove it. |
8c9bd46 to
577803c
Compare
|
Moreover, please avoid force-pushing (as recommended by the devguide). |
Noted @erlend-aasland |
Lib/test/test_sqlite3/test_dbapi.py
Outdated
| self.assertEqual(self.blob[5:5], b"") | ||
|
|
||
| def test_blob_get_empty_slice_oob_indices(self): | ||
| self.cx.execute("delete from test") |
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.
I prefer to leave this out. Just add a new row and blobopen it instead. Alternatively, make the test work with the pre-filled data in the constructor.
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.
@erlend-aasland The test has been updated.
Fix assertion failure when slicing a
sqlite3.Blobwith indices that result in an empty slice.PyObject *read_multiple(pysqlite_Blob *, Py_ssize_t, Py_ssize_t): Assertion 'offset < sqlite3_blob_bytes(self->blob)' failed#142787