mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-100370: fix OverflowError in sqlite3.Connection.blobopen for 32-bit builds (#103902)
This commit is contained in:
parent
cab1298a60
commit
a05bad3254
4 changed files with 36 additions and 9 deletions
|
@ -1495,6 +1495,14 @@ class BlobTests(unittest.TestCase):
|
|||
"Cannot operate on a closed database",
|
||||
blob.read)
|
||||
|
||||
def test_blob_32bit_rowid(self):
|
||||
# gh-100370: we should not get an OverflowError for 32-bit rowids
|
||||
with memory_database() as cx:
|
||||
rowid = 2**32
|
||||
cx.execute("create table t(t blob)")
|
||||
cx.execute("insert into t(rowid, t) values (?, zeroblob(1))", (rowid,))
|
||||
cx.blobopen('t', 't', rowid)
|
||||
|
||||
|
||||
@threading_helper.requires_working_threading()
|
||||
class ThreadTests(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue