1
0
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:
drh
2013-11-13 23:48:46 +00:00
parent 1f57794c92
commit e6400b9901
3 changed files with 19 additions and 7 deletions

View File

@@ -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. */