/ Check-in [a5418c7f]
Login

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

Overview
Comment:Remove code made obsolete by the changes to index processing that allow range search on the rowid.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a5418c7fc216a30abf7b2fa8c579aee586393a91
User & Date: drh 2011-11-16 16:23:15
Context
2011-11-16
18:08
Merge the PCACHE2 changes into trunk. check-in: 457513f2 user: drh tags: trunk
17:32
Change the multiplexor suffix from 2 to 3 digits. Closed-Leaf check-in: 06e0cdaf user: drh tags: 3-digit-multiplex-suffix
16:23
Remove code made obsolete by the changes to index processing that allow range search on the rowid. check-in: a5418c7f user: drh tags: trunk
15:41
Fix an invalid assert() statement added by [3b58f5f066]. check-in: 888b09dd user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

  1449   1449   };
  1450   1450   
  1451   1451   /*
  1452   1452   ** Allowed values of UnpackedRecord.flags
  1453   1453   */
  1454   1454   #define UNPACKED_NEED_FREE     0x0001  /* Memory is from sqlite3Malloc() */
  1455   1455   #define UNPACKED_NEED_DESTROY  0x0002  /* apMem[]s should all be destroyed */
  1456         -#define UNPACKED_IGNORE_ROWID  0x0004  /* Ignore trailing rowid on key1 */
  1457   1456   #define UNPACKED_INCRKEY       0x0008  /* Make this key an epsilon larger */
  1458   1457   #define UNPACKED_PREFIX_MATCH  0x0010  /* A prefix match is considered OK */
  1459   1458   #define UNPACKED_PREFIX_SEARCH 0x0020  /* A prefix match is considered OK */
  1460   1459   
  1461   1460   /*
  1462   1461   ** Each SQL index is represented in memory by an
  1463   1462   ** instance of the following structure.

Changes to src/vdbeaux.c.

  2939   2939   ** Key1 and Key2 do not have to contain the same number of fields.
  2940   2940   ** The key with fewer fields is usually compares less than the 
  2941   2941   ** longer key.  However if the UNPACKED_INCRKEY flags in pPKey2 is set
  2942   2942   ** and the common prefixes are equal, then key1 is less than key2.
  2943   2943   ** Or if the UNPACKED_MATCH_PREFIX flag is set and the prefixes are
  2944   2944   ** equal, then the keys are considered to be equal and
  2945   2945   ** the parts beyond the common prefix are ignored.
  2946         -**
  2947         -** If the UNPACKED_IGNORE_ROWID flag is set, then the last byte of
  2948         -** the header of pKey1 is ignored.  It is assumed that pKey1 is
  2949         -** an index key, and thus ends with a rowid value.  The last byte
  2950         -** of the header will therefore be the serial type of the rowid:
  2951         -** one of 1, 2, 3, 4, 5, 6, 8, or 9 - the integer serial types.
  2952         -** The serial type of the final rowid will always be a single byte.
  2953         -** By ignoring this last byte of the header, we force the comparison
  2954         -** to ignore the rowid at the end of key1.
  2955   2946   */
  2956   2947   int sqlite3VdbeRecordCompare(
  2957   2948     int nKey1, const void *pKey1, /* Left key */
  2958   2949     UnpackedRecord *pPKey2        /* Right key */
  2959   2950   ){
  2960   2951     int d1;            /* Offset into aKey[] of next data element */
  2961   2952     u32 idx1;          /* Offset into aKey[] of next header element */
................................................................................
  2980   2971     ** impact, since this routine is a very high runner.  And so, we choose
  2981   2972     ** to ignore the compiler warnings and leave this variable uninitialized.
  2982   2973     */
  2983   2974     /*  mem1.u.i = 0;  // not needed, here to silence compiler warning */
  2984   2975     
  2985   2976     idx1 = getVarint32(aKey1, szHdr1);
  2986   2977     d1 = szHdr1;
  2987         -  if( pPKey2->flags & UNPACKED_IGNORE_ROWID ){
  2988         -    szHdr1--;
  2989         -  }
  2990   2978     nField = pKeyInfo->nField;
  2991   2979     while( idx1<szHdr1 && i<pPKey2->nField ){
  2992   2980       u32 serial_type1;
  2993   2981   
  2994   2982       /* Read the serial types for the next element in each key. */
  2995   2983       idx1 += getVarint32( aKey1+idx1, serial_type1 );
  2996   2984       if( d1>=nKey1 && sqlite3VdbeSerialTypeLen(serial_type1)>0 ) break;