Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Apr 27, 2023
1 parent 0a8bf03 commit 33e196b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Lib/test/test_sqlite3/test_dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,14 @@ def test_blob_closed_db_read(self):
"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):
Expand Down

0 comments on commit 33e196b

Please sign in to comment.