Paul Melis added the comment: Just a bit more info on the patch. When running stock Python 2.7.4 the attached test script bug-binding_parameter_0.py returns:
module: 2.6.0 sqlite: 3.7.9 Archives Archives/2011 Archives/2012 Traceback (most recent call last): File "bug-binding_parameter_0.py", line 45, in <module> cur = dbconn.execute('select uidvalidity from folders where name=?', (folder,)) sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type. The error suggests a misuse of the sqlite3 API, but the actual SQLite error is masked. After altering _sqlite/statement.c to include the SQLite error code (as in the patch), we get: module: 2.6.0 sqlite: 3.7.9 Archives Archives/2011 Archives/2012 Traceback (most recent call last): File "bug-binding_parameter_0.py", line 45, in <module> cur = dbconn.execute('select uidvalidity from folders where name=?', (folder,)) sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type. (sqlite error 21) Error 21 = SQLITE_MISUSE, suggesting something is definitely wrong in the way the SQLite API is used (for this test case). Commenting out the ACTION_RESET all works fine again: module: 2.6.0 sqlite: 3.7.9 Archives Archives/2011 Archives/2012 ---------- Added file: http://bugs.python.org/file30087/bug-binding_parameter_0.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10513> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com