/ Check-in [24ef1654]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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 Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

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

/* Opcode:  Gosub P1 P2 * * *







|
|
|



<
<
<







751
752
753
754
755
756
757
758
759
760
761
762
763



764
765
766
767
768
769
770
  /* Call the progress callback if it is configured and the required number
  ** of VDBE ops have been executed (either since this invocation of
  ** sqlite3VdbeExec() or since last time the progress callback was called).
  ** If the progress callback returns non-zero, exit the virtual machine with
  ** a return code SQLITE_ABORT.
  */
  if( db->xProgress!=0 && nVmStep>=nProgressLimit ){
    assert( db->nProgressOps!=0 );
    nProgressLimit = nVmStep + db->nProgressOps - (nVmStep%db->nProgressOps);
    if( db->xProgress(db->pProgressArg) ){
      rc = SQLITE_INTERRUPT;
      goto vdbe_error_halt;
    }



  }
#endif
  
  break;
}

/* Opcode:  Gosub P1 P2 * * *