Skip to content

Commit 33e196b

Browse files
Add test
1 parent 0a8bf03 commit 33e196b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_sqlite3/test_dbapi.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,14 @@ def test_blob_closed_db_read(self):
14951495
"Cannot operate on a closed database",
14961496
blob.read)
14971497

1498+
def test_blob_32bit_rowid(self):
1499+
# gh-100370: we should not get an OverflowError for 32-bit rowids
1500+
with memory_database() as cx:
1501+
rowid = 2**32
1502+
cx.execute("create table t(t blob)")
1503+
cx.execute("insert into t(rowid, t) values (?, zeroblob(1))", (rowid,))
1504+
cx.blobopen('t', 't', rowid)
1505+
14981506

14991507
@threading_helper.requires_working_threading()
15001508
class ThreadTests(unittest.TestCase):

0 commit comments

Comments
 (0)