mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-39523: Use do-while loop pysqlite_cursor_executescript() (GH-18305)
This commit is contained in:
parent
5bfa945605
commit
25e244c925
1 changed files with 2 additions and 3 deletions
|
@ -715,14 +715,13 @@ pysqlite_cursor_executescript(pysqlite_Cursor *self, PyObject *script_obj)
|
|||
}
|
||||
|
||||
/* execute statement, and ignore results of SELECT statements */
|
||||
rc = SQLITE_ROW;
|
||||
while (rc == SQLITE_ROW) {
|
||||
do {
|
||||
rc = pysqlite_step(statement, self->connection);
|
||||
if (PyErr_Occurred()) {
|
||||
(void)sqlite3_finalize(statement);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
} while (rc == SQLITE_ROW);
|
||||
|
||||
if (rc != SQLITE_DONE) {
|
||||
(void)sqlite3_finalize(statement);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue