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: bugs in _sqlite module
Type: Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, vstinner
Priority: normal Keywords: patch

Created on 2008-07-07 13:16 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
_sqlite.patch vstinner, 2008-07-07 13:16 Patch to fix described bugs
Messages (2)
msg69387 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-07-07 13:16
(A) module_register_adapter() doesn't check microprotocols_add() 
result, whereas it can fails (eg. dict setitem error). 
Example: "import _sqlite3; _sqlite3.register_adapter({}, None)" => 
should raise a TypeError (unhashable type: 'dict').

(B) Connection.set_isolation_level() tries to create the 
string "BEGIN "+isolation_level and the store it as PyString in 
begin_statement. But if the result can not be converted to string, 
Python crashs. Example:

>>> import _sqlite3
>>> c=_sqlite3.Connection("a")
>>> c.isolation_level = u"\xe9"
Erreur de segmentation (core dumped)

Attached patch fix the two bugs.
msg69850 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-07-16 22:33
Thanks, fixed in r65040.
History
Date User Action Args
2022-04-11 14:56:36adminsetgithub: 47562
2008-07-16 22:33:35georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg69850
nosy: + georg.brandl
2008-07-07 13:16:51vstinnercreate