1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-02 05:54:29 +03:00

In sqlite3VdbeHalt(), return as soon as possible if

Vdbe.magic!=VDBE_MAGIC_RUN. This makes sqlite3_reset() slightly faster in some
cases.

FossilOrigin-Name: 80adc0cb4ed7bacc54b15ac8b5b205403939c8c4
This commit is contained in:
dan
2017-02-21 21:24:05 +00:00
parent f0e808c60b
commit 1325adf5e9
3 changed files with 10 additions and 10 deletions

View File

@@ -2609,13 +2609,13 @@ int sqlite3VdbeHalt(Vdbe *p){
** one, or the complete transaction if there is no statement transaction.
*/
if( p->magic!=VDBE_MAGIC_RUN ){
return SQLITE_OK;
}
if( db->mallocFailed ){
p->rc = SQLITE_NOMEM_BKPT;
}
closeAllCursors(p);
if( p->magic!=VDBE_MAGIC_RUN ){
return SQLITE_OK;
}
checkActiveVdbeCnt(db);
/* No commit or rollback needed if the program never started or if the