1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-19 21:43:15 +03:00

Add the rowid field to the end of sample records stored in the sqlite_stat4 table.

FossilOrigin-Name: 3a5e8ab7ddbe1d943b35ef329fe4e5a1bfdb0d9d
This commit is contained in:
dan
2013-08-10 19:08:30 +00:00
parent 84d4fcc52d
commit dd6e1f193e
9 changed files with 208 additions and 121 deletions

View File

@@ -2422,7 +2422,7 @@ static void whereKeyStats(
int res; /* Result of comparison operation */
assert( pIdx->nSample>0 );
assert( pRec->nField>0 && iCol<pIdx->nColumn );
assert( pRec->nField>0 && iCol<=pIdx->nColumn );
do{
iTest = (iMin+i)/2;
res = sqlite3VdbeRecordCompare(aSample[iTest].n, aSample[iTest].p, pRec);
@@ -2684,6 +2684,8 @@ static int whereEqualScanEst(
return SQLITE_NOTFOUND;
}
/* This is an optimization only. The call to sqlite3Stat4ProbeSetValue()
** below would return the same value. */
if( nEq>p->nColumn ){
*pnRow = 1;
return SQLITE_OK;