/ Check-in [38868f84]
Login

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

Overview
Comment:Fix the assert() of the previous check-in so that it works even when compiled without SQLITE_DEBUG.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tkt-f97c4637
Files: files | file ages | folders
SHA1:38868f845e1ad4d61354ab1ad39dd19e3e07c7fd
User & Date: drh 2015-01-19 20:57:19
Context
2015-01-19
20:59
Make sure that the KeyInfo.nXField value of ephermeral tables used for ORDER BY and GROUP BY is set correctly, so that the correct comparison function can be choosen by sqlite3VdbeFindCompare(). check-in: c16bae5e user: drh tags: tkt-f97c4637
20:57
Fix the assert() of the previous check-in so that it works even when compiled without SQLITE_DEBUG. check-in: 38868f84 user: drh tags: tkt-f97c4637
19:48
An alternative way of implementing the assert() that verifies the relative values of KeyInfo.nField+KeyInfo.nXField and the number of columns in a record. This version of the assert() only fires when the high-speed comparison routines are used - which is to say it only fires when the constraint actually matters. check-in: bf744b49 user: drh tags: tkt-f97c4637
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

  3376   3376     assert( szHdr<=nKey );
  3377   3377     while( idx<szHdr ){
  3378   3378       idx += getVarint32(aKey+idx, notUsed);
  3379   3379       nField++;
  3380   3380     }
  3381   3381     assert( nField <= pKeyInfo->nField+pKeyInfo->nXField );
  3382   3382   }
         3383  +#else
         3384  +# define vdbeAssertFieldCountWithinLimits(A,B,C)
  3383   3385   #endif
  3384   3386   
  3385   3387   /*
  3386   3388   ** Both *pMem1 and *pMem2 contain string values. Compare the two values
  3387   3389   ** using the collation sequence pColl. As usual, return a negative , zero
  3388   3390   ** or positive value if *pMem1 is less than, equal to or greater than 
  3389   3391   ** *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);".