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.

Author erlendaasland
Recipients berker.peksag, christian.heimes, corona10, erlendaasland, serhiy.storchaka
Date 2021-02-25.13:22:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614259329.73.0.250196342623.issue43290@roundup.psfhosted.org>
In-reply-to
Content
msg387668 was a little bit hasty. I'll try again:

Dong-hee Na:
> Hmm by the way the current implementation returns SQLITE_OK if the statement is NULL, but it looks like return SQLITE_MISUSE if we apply this patch.
> Does it not cause any behavior regression? if so we should add news also.

No, behaviour still stays the same; no regressions introduced. The bug is triggered by executing an empty statement. This will pass an empty statement to pysqlite_step() in line 519 of Modules/_sqlite/cursor.c. Earlier, this returned SQLITE_OK. sqlite3_column_count(NULL) returns 0, so we slide through the rest of the loop without much happening. Now, pysqlite_step() returns SQLITE_MISUSE, which only results in the statement being reset in line 529, and the error cleared in line 530. Then we bail out of the loop.

So, the current comment is correct, the SQLite changelog was correct, the workaround and old comment was wrong.

I'm done :)
History
Date User Action Args
2021-02-25 13:22:09erlendaaslandsetrecipients: + erlendaasland, christian.heimes, berker.peksag, serhiy.storchaka, corona10
2021-02-25 13:22:09erlendaaslandsetmessageid: <1614259329.73.0.250196342623.issue43290@roundup.psfhosted.org>
2021-02-25 13:22:09erlendaaslandlinkissue43290 messages
2021-02-25 13:22:09erlendaaslandcreate