/ Check-in [24ef1654]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Simplification to the progress callback check. One branch removed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:24ef16548eebcdb9d8b40308f6a16dabf8f8d474
User & Date: drh 2013-11-14 00:09:48
Original Comment: Simplification to the progress callback check. On branch removed.
Context
2013-11-14
19:34
Remove an unused local variable. check-in: 10d59226 user: drh tags: trunk
19:18
Merge the skip-scan optimization into the sessions branch. check-in: 7596d1bf user: drh tags: sessions
15:35
An experimental virtual tables for showing the content of internal schema objects. Leaf check-in: d1fbc6ca user: drh tags: schema2-vtab
00:09
Simplification to the progress callback check. One branch removed. check-in: 24ef1654 user: drh tags: trunk
2013-11-13
23:48
Make sure the progress callback is invoked prior to an SQLITE_ROW return if it is overdue to be called. check-in: 21f59b04 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

   751    751     /* Call the progress callback if it is configured and the required number
   752    752     ** of VDBE ops have been executed (either since this invocation of
   753    753     ** sqlite3VdbeExec() or since last time the progress callback was called).
   754    754     ** If the progress callback returns non-zero, exit the virtual machine with
   755    755     ** a return code SQLITE_ABORT.
   756    756     */
   757    757     if( db->xProgress!=0 && nVmStep>=nProgressLimit ){
   758         -    int prc;
   759         -    prc = db->xProgress(db->pProgressArg);
   760         -    if( prc!=0 ){
          758  +    assert( db->nProgressOps!=0 );
          759  +    nProgressLimit = nVmStep + db->nProgressOps - (nVmStep%db->nProgressOps);
          760  +    if( db->xProgress(db->pProgressArg) ){
   761    761         rc = SQLITE_INTERRUPT;
   762    762         goto vdbe_error_halt;
   763    763       }
   764         -    if( db->xProgress!=0 ){
   765         -      nProgressLimit = nVmStep + db->nProgressOps - (nVmStep%db->nProgressOps);
   766         -    }
   767    764     }
   768    765   #endif
   769    766     
   770    767     break;
   771    768   }
   772    769   
   773    770   /* Opcode:  Gosub P1 P2 * * *