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 alex.henrie
Recipients alex.henrie
Date 2020-02-02.02:05:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580609121.79.0.36186029109.issue39523@roundup.psfhosted.org>
In-reply-to
Content
pysqlite_cursor_executescript currently has the following while loop:

    /* execute statement, and ignore results of SELECT statements */
    rc = SQLITE_ROW;
    while (rc == SQLITE_ROW) {
        rc = pysqlite_step(statement, self->connection);
        if (PyErr_Occurred()) {
            (void)sqlite3_finalize(statement);
            goto error;
        }
    }

This can and should be rewritten as a do-while loop to avoid having to initialize rc to SQLITE_ROW and then check its value knowing that the value check will succeed.
History
Date User Action Args
2020-02-02 02:05:21alex.henriesetrecipients: + alex.henrie
2020-02-02 02:05:21alex.henriesetmessageid: <1580609121.79.0.36186029109.issue39523@roundup.psfhosted.org>
2020-02-02 02:05:21alex.henrielinkissue39523 messages
2020-02-02 02:05:21alex.henriecreate