1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Add the index7.test script for testing partial indices with WITHOUT ROWID

tables.  Fix bugs in ANALYZE located by that script.

FossilOrigin-Name: 79befe3ac1f676272b78423b9aa5dac41435420e
This commit is contained in:
drh
2013-11-04 22:04:17 +00:00
parent da475b8dbc
commit d269461c91
5 changed files with 263 additions and 10 deletions

View File

@@ -526,7 +526,7 @@ static int sampleIsBetter(
** remove the least desirable sample from p->a[] to make room.
*/
static void sampleInsert(Stat4Accum *p, Stat4Sample *pNew, int nEqZero){
Stat4Sample *pSample;
Stat4Sample *pSample = 0;
int i;
assert( IsStat4 || nEqZero==0 );
@@ -569,6 +569,7 @@ static void sampleInsert(Stat4Accum *p, Stat4Sample *pNew, int nEqZero){
sampleClear(p->db, pMin);
memmove(pMin, &pMin[1], sizeof(p->a[0])*(p->nSample-p->iMin-1));
pSample = &p->a[p->nSample-1];
pSample->nRowid = 0;
pSample->anEq = anEq;
pSample->anDLt = anDLt;
pSample->anLt = anLt;