/ Check-in [a10a6bba]
Login

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

Overview
Comment:Remove an unused parameter from sqlite3VdbeIdxRowid(). This is cosmetic only as the C-compiler optimizers were already omitting this parameter on amalgamation builds.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | micro-optimizations
Files: files | file ages | folders
SHA1: a10a6bba4963761b490b7243b388dcc920c4cfed
User & Date: drh 2014-09-16 14:55:08
Context
2014-09-16
18:22
Simplification of the OP_Column logic for the case of rows with overflow. check-in: f7367803 user: drh tags: micro-optimizations
14:55
Remove an unused parameter from sqlite3VdbeIdxRowid(). This is cosmetic only as the C-compiler optimizers were already omitting this parameter on amalgamation builds. check-in: a10a6bba user: drh tags: micro-optimizations
14:37
Reduce the number of arguments to RecordCompare functions from 4 to 3, resulting in a small performance increase. check-in: 8239c35a user: drh tags: micro-optimizations
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

  4765   4765     pOut->flags = MEM_Null;
  4766   4766     rc = sqlite3VdbeCursorMoveto(pC);
  4767   4767     if( NEVER(rc) ) goto abort_due_to_error;
  4768   4768     assert( pC->deferredMoveto==0 );
  4769   4769     assert( pC->isTable==0 );
  4770   4770     if( !pC->nullRow ){
  4771   4771       rowid = 0;  /* Not needed.  Only used to silence a warning. */
  4772         -    rc = sqlite3VdbeIdxRowid(db, pCrsr, &rowid);
         4772  +    rc = sqlite3VdbeIdxRowid(pCrsr, &rowid);
  4773   4773       if( rc!=SQLITE_OK ){
  4774   4774         goto abort_due_to_error;
  4775   4775       }
  4776   4776       pOut->u.i = rowid;
  4777   4777       pOut->flags = MEM_Int;
  4778   4778     }
  4779   4779     break;

Changes to src/vdbeInt.h.

   394    394   u32 sqlite3VdbeSerialType(Mem*, int);
   395    395   u32 sqlite3VdbeSerialPut(unsigned char*, Mem*, u32);
   396    396   u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
   397    397   void sqlite3VdbeDeleteAuxData(Vdbe*, int, int);
   398    398   
   399    399   int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
   400    400   int sqlite3VdbeIdxKeyCompare(VdbeCursor*,UnpackedRecord*,int*);
   401         -int sqlite3VdbeIdxRowid(sqlite3*, BtCursor *, i64 *);
          401  +int sqlite3VdbeIdxRowid(BtCursor *, i64 *);
   402    402   int sqlite3VdbeExec(Vdbe*);
   403    403   int sqlite3VdbeList(Vdbe*);
   404    404   int sqlite3VdbeHalt(Vdbe*);
   405    405   int sqlite3VdbeChangeEncoding(Mem *, int);
   406    406   int sqlite3VdbeMemTooBig(Mem*);
   407    407   int sqlite3VdbeMemCopy(Mem*, const Mem*);
   408    408   void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);

Changes to src/vdbeaux.c.

  3872   3872   ** pCur points at an index entry created using the OP_MakeRecord opcode.
  3873   3873   ** Read the rowid (the last field in the record) and store it in *rowid.
  3874   3874   ** Return SQLITE_OK if everything works, or an error code otherwise.
  3875   3875   **
  3876   3876   ** pCur might be pointing to text obtained from a corrupt database file.
  3877   3877   ** So the content cannot be trusted.  Do appropriate checks on the content.
  3878   3878   */
  3879         -int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
         3879  +int sqlite3VdbeIdxRowid(BtCursor *pCur, i64 *rowid){
  3880   3880     i64 nCellKey = 0;
  3881   3881     int rc;
  3882   3882     u32 szHdr;        /* Size of the header */
  3883   3883     u32 typeRowid;    /* Serial type of the rowid */
  3884   3884     u32 lenRowid;     /* Size of the rowid */
  3885   3885     Mem m, v;
  3886   3886   
  3887         -  UNUSED_PARAMETER(db);
  3888         -
  3889   3887     /* Get the size of the index entry.  Only indices entries of less
  3890   3888     ** than 2GiB are support - anything large must be database corruption.
  3891   3889     ** Any corruption is detected in sqlite3BtreeParseCellPtr(), though, so
  3892   3890     ** this code can safely assume that nCellKey is 32-bits  
  3893   3891     */
  3894   3892     assert( sqlite3BtreeCursorIsValid(pCur) );
  3895   3893     VVA_ONLY(rc =) sqlite3BtreeKeySize(pCur, &nCellKey);