mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Make sure the progress callback is invoked prior to an SQLITE_ROW return if
it is overdue to be called. FossilOrigin-Name: 21f59b04f74738d08ebad693646bbaea24dc45ef
This commit is contained in:
12
src/vdbe.c
12
src/vdbe.c
@@ -1186,6 +1186,18 @@ case OP_ResultRow: {
|
||||
assert( pOp->p1>0 );
|
||||
assert( pOp->p1+pOp->p2<=(p->nMem-p->nCursor)+1 );
|
||||
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
/* Run the progress counter just before returning.
|
||||
*/
|
||||
if( db->xProgress!=0
|
||||
&& nVmStep>=nProgressLimit
|
||||
&& db->xProgress(db->pProgressArg)!=0
|
||||
){
|
||||
rc = SQLITE_INTERRUPT;
|
||||
goto vdbe_error_halt;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If this statement has violated immediate foreign key constraints, do
|
||||
** not return the number of rows modified. And do not RELEASE the statement
|
||||
** transaction. It needs to be rolled back. */
|
||||
|
Reference in New Issue
Block a user