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

Fix the progress handler so that it does not fire too soon during an

sqlite3_step() call other than the first.

FossilOrigin-Name: b41ef5d6db107cac2b1b46a955e63414434ee976
This commit is contained in:
drh
2015-06-24 14:36:27 +00:00
parent c6e956f038
commit 6cbbdb08f8
3 changed files with 9 additions and 13 deletions

View File

@@ -582,13 +582,9 @@ int sqlite3VdbeExec(
sqlite3VdbeIOTraceSql(p);
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
if( db->xProgress ){
u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
assert( 0 < db->nProgressOps );
nProgressLimit = (unsigned)p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
if( nProgressLimit==0 ){
nProgressLimit = db->nProgressOps;
}else{
nProgressLimit %= (unsigned)db->nProgressOps;
}
nProgressLimit = db->nProgressOps - (iPrior % db->nProgressOps);
}
#endif
#ifdef SQLITE_DEBUG