/ Check-in [d1db8d58]
Login

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

Overview
Comment:Small performance improvement in sqlite3_step().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:d1db8d5894450b24bb0335983503d9bbf6cc48a0ae4b83291283fb2d32b6b25b
User & Date: drh 2018-12-11 12:51:46
Context
2018-12-12
11:23
OSSFuzz found a case where an assert() inside sqlite3ExprCompare() can be true. Test case added to TH3. check-in: 23b62fb1 user: drh tags: trunk
2018-12-11
13:44
Merge latest trunk changes into this branch. check-in: d8dd98a3 user: dan tags: wal2
12:51
Small performance improvement in sqlite3_step(). check-in: d1db8d58 user: drh tags: trunk
12:20
Small performance improvement in the sqlite3_bind() family of interfaces. check-in: 1dc0c3df user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

   581    581     /* Check that malloc() has not failed. If it has, return early. */
   582    582     db = p->db;
   583    583     if( db->mallocFailed ){
   584    584       p->rc = SQLITE_NOMEM;
   585    585       return SQLITE_NOMEM_BKPT;
   586    586     }
   587    587   
   588         -  if( p->pc<=0 && p->expired ){
          588  +  if( p->pc<0 && p->expired ){
   589    589       p->rc = SQLITE_SCHEMA;
   590    590       rc = SQLITE_ERROR;
   591    591       goto end_of_step;
   592    592     }
   593    593     if( p->pc<0 ){
   594    594       /* If there are no other statements currently running, then
   595    595       ** reset the interrupt flag.  This prevents a call to sqlite3_interrupt
................................................................................
   658    658     ** contains the value that would be returned if sqlite3_finalize() 
   659    659     ** were called on statement p.
   660    660     */
   661    661     assert( rc==SQLITE_ROW  || rc==SQLITE_DONE   || rc==SQLITE_ERROR 
   662    662          || (rc&0xff)==SQLITE_BUSY || rc==SQLITE_MISUSE
   663    663     );
   664    664     assert( (p->rc!=SQLITE_ROW && p->rc!=SQLITE_DONE) || p->rc==p->rcApp );
   665         -  if( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 
   666         -   && rc!=SQLITE_ROW 
   667         -   && rc!=SQLITE_DONE 
          665  +  if( rc!=SQLITE_ROW 
          666  +   && rc!=SQLITE_DONE
          667  +   && (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0
   668    668     ){
   669    669       /* If this statement was prepared using saved SQL and an 
   670    670       ** error has occurred, then return the error code in p->rc to the
   671    671       ** caller. Set the error code in the database handle to the same value.
   672    672       */ 
   673    673       rc = sqlite3VdbeTransferError(p);
   674    674     }