mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Change sqlite3_step() so that it automatically calls sqlite3_reset() instead
of returning SQLITE_MISUSE when invoked on a prepared statement that previously returned any value other than SQLITE_ROW. FossilOrigin-Name: 3e646e3f4cd0ca288e444561e951cecfdaee2ab5
This commit is contained in:
@@ -321,9 +321,12 @@ static int sqlite3Step(Vdbe *p){
|
||||
|
||||
assert(p);
|
||||
if( p->magic!=VDBE_MAGIC_RUN ){
|
||||
sqlite3_log(SQLITE_MISUSE,
|
||||
"attempt to step a halted statement: [%s]", p->zSql);
|
||||
return SQLITE_MISUSE_BKPT;
|
||||
/* We used to require that sqlite3_reset() be called before retrying
|
||||
** sqlite3_step() after any error. But after 3.6.23, we changed this
|
||||
** so that sqlite3_reset() would be called automatically instead of
|
||||
** throwing the error.
|
||||
*/
|
||||
sqlite3_reset((sqlite3_stmt*)p);
|
||||
}
|
||||
|
||||
/* Check that malloc() has not failed. If it has, return early. */
|
||||
|
Reference in New Issue
Block a user