This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Unraised overflow error in sqlite3.Row indexing
Type: behavior Stage: needs patch
Components: Extension Modules Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Claudiu.Popa, ghaering, serhiy.storchaka
Priority: normal Keywords: easy

Created on 2014-05-26 20:05 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg219174 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-05-26 20:05
When integer index overflows C long, sqlite3.Row.__getitem__() doesn't raise an exception. Instead overflow exception is raised later.

>>> import sqlite3
>>> con = sqlite3.connect(":memory:")
>>> con.row_factory = sqlite3.Row
>>> row = con.execute("select 1 as a, 2 as b").fetchone()
>>> row[2**1000]
2
>>> 
OverflowError: Python int too large to convert to C long
msg219175 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-05-26 20:20
Actually this happens after applying the patch from issue10203.
History
Date User Action Args
2022-04-11 14:58:04adminsetgithub: 65783
2014-05-26 20:20:53serhiy.storchakasetstatus: open -> closed
resolution: not a bug
messages: + msg219175
2014-05-26 20:05:45serhiy.storchakacreate