1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Small performance increase in sqlite3_step() for the common case where

it returns SQLITE_ROW.

FossilOrigin-Name: 893448265299f4c70c32c8e92ea66f8d33c1c213b21701f73fa3815514cd5ef6
This commit is contained in:
drh
2018-12-04 13:51:26 +00:00
parent cfc45b1021
commit b7de827137
3 changed files with 16 additions and 14 deletions

View File

@@ -629,16 +629,18 @@ static int sqlite3Step(Vdbe *p){
db->nVdbeExec--;
}
if( rc!=SQLITE_ROW ){
#ifndef SQLITE_OMIT_TRACE
/* If the statement completed successfully, invoke the profile callback */
if( rc!=SQLITE_ROW ) checkProfileCallback(db, p);
/* If the statement completed successfully, invoke the profile callback */
checkProfileCallback(db, p);
#endif
if( rc==SQLITE_DONE && db->autoCommit ){
assert( p->rc==SQLITE_OK );
p->rc = doWalCallbacks(db);
if( p->rc!=SQLITE_OK ){
rc = SQLITE_ERROR;
if( rc==SQLITE_DONE && db->autoCommit ){
assert( p->rc==SQLITE_OK );
p->rc = doWalCallbacks(db);
if( p->rc!=SQLITE_OK ){
rc = SQLITE_ERROR;
}
}
}