aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sqlite3/test_dbapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_sqlite3/test_dbapi.py')
-rw-r--r--Lib/test/test_sqlite3/test_dbapi.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_sqlite3/test_dbapi.py b/Lib/test/test_sqlite3/test_dbapi.py
index 1bb0e13e356..328b0467e7f 100644
--- a/Lib/test/test_sqlite3/test_dbapi.py
+++ b/Lib/test/test_sqlite3/test_dbapi.py
@@ -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):