[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement

R. David Murray report at bugs.python.org
Fri Jan 4 18:55:48 CET 2013


R. David Murray added the comment:

Considering that sqlite's 'replace' is a synonym for 'insert or replace', I think the logic error is actually in the detect_statement_type function.  Since actions are conditionally taken on the REPLACE statement type in the code, including at least one that adjusts the lastrowid, I don't think the fix for lastrowid is as simple as just always setting it.  But I'm not that familiar with sqlite internals, so perhaps someone with more knowledge will weigh in.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16864>
_______________________________________


More information about the Python-bugs-list mailing list