Fix a problem involving detail=col and column filters.
FossilOrigin-Name: 7558a0ad2276e91f2faced8ea405d9fdb4fa0c6e
This commit is contained in:
parent
795502d26c
commit
8498f387be
@ -5013,21 +5013,26 @@ static void fts5IterSetOutputs_Col(Fts5Iter *pIter, Fts5SegIter *pSeg){
|
||||
assert( pIter->pIndex->pConfig->eDetail==FTS5_DETAIL_COLUMNS );
|
||||
assert( pColset );
|
||||
|
||||
if( pSeg->iLeafOffset+pSeg->nPos<=pSeg->pLeaf->szLeaf && 0 ){
|
||||
if( pSeg->iLeafOffset+pSeg->nPos<=pSeg->pLeaf->szLeaf ){
|
||||
/* All data is stored on the current page. Populate the output
|
||||
** variables to point into the body of the page object. */
|
||||
Fts5PoslistWriter writer = {0};
|
||||
const u8 *a = &pSeg->pLeaf->p[pSeg->iLeafOffset];
|
||||
int n = pSeg->nPos;
|
||||
int iCol = 0;
|
||||
int iCVal = pColset->aiCol[0];
|
||||
i64 iPos = 0;
|
||||
int iOff = 0;
|
||||
|
||||
fts5BufferZero(&pIter->poslist);
|
||||
while( 0==sqlite3Fts5PoslistNext64(a, n, &iOff, &iPos) ){
|
||||
if( iPos==pColset->aiCol[iCol] ){
|
||||
sqlite3Fts5PoslistWriterAppend(&pIter->poslist, &writer, iPos);
|
||||
if( ++iCol>=pColset->nCol ) break;
|
||||
while( iPos>=iCVal ){
|
||||
if( iPos==iCVal ){
|
||||
sqlite3Fts5PoslistWriterAppend(&pIter->poslist, &writer, iPos);
|
||||
}
|
||||
if( ++iCol>=pColset->nCol ) goto setoutputs_col_out;
|
||||
assert( pColset->aiCol[iCol]>iCVal );
|
||||
iCVal = pColset->aiCol[iCol];
|
||||
}
|
||||
}
|
||||
|
||||
@ -5039,6 +5044,7 @@ static void fts5IterSetOutputs_Col(Fts5Iter *pIter, Fts5SegIter *pSeg){
|
||||
fts5SegiterPoslist(pIter->pIndex, pSeg, pColset, &pIter->poslist);
|
||||
}
|
||||
|
||||
setoutputs_col_out:
|
||||
pIter->base.pData = pIter->poslist.p;
|
||||
pIter->base.nData = pIter->poslist.n;
|
||||
}
|
||||
|
15
manifest
15
manifest
@ -1,5 +1,5 @@
|
||||
C Experimental\sperformance\senhancements\sfor\sfts5.
|
||||
D 2016-01-22T19:48:34.825
|
||||
C Fix\sa\sproblem\sinvolving\sdetail=col\sand\scolumn\sfilters.
|
||||
D 2016-01-23T14:45:36.706
|
||||
F Makefile.in 027c1603f255390c43a426671055a31c0a65fdb4
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc d2b93511a969c0c8fcf52aeb5e426571e8c610d2
|
||||
@ -103,7 +103,7 @@ F ext/fts5/fts5_buffer.c 7d3f6f01f8fdc45204e6a33925ef8478a67d28dd
|
||||
F ext/fts5/fts5_config.c 0c384ebdd23fd055e2e50a93277b8d59da538238
|
||||
F ext/fts5/fts5_expr.c 48b9131b74c8d3b8c12ba0f7995e2d60eecce9f2
|
||||
F ext/fts5/fts5_hash.c 1b113977296cf4212c6ec667d5e3f2bd18036955
|
||||
F ext/fts5/fts5_index.c 19062d1f40ba6d88d786a986d1c20f9d741799d0
|
||||
F ext/fts5/fts5_index.c bd5476edd4d6ef37fc389794a78f47f29f521634
|
||||
F ext/fts5/fts5_main.c 833db0a3df10ab26e0221a9baa40cf871c450df3
|
||||
F ext/fts5/fts5_storage.c fb2eaec3aa954b680d43096dc539f8270bd6390e
|
||||
F ext/fts5/fts5_tcl.c f8731e0508299bd43f1a2eff7dbeaac870768966
|
||||
@ -1419,10 +1419,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P 7323175337b7ba85ac932ca892b28860f6a5b688
|
||||
R bc65520844365f59e43048a22901b688
|
||||
T *branch * fts5-perf
|
||||
T *sym-fts5-perf *
|
||||
T -sym-trunk *
|
||||
P b5a57b812fd6a734cf2a342bf0b730ae18912d73
|
||||
R 20bdd3799e5ba562672d44f9df7f8c2a
|
||||
U dan
|
||||
Z 20f25a74d681d80924173ee060583d9e
|
||||
Z fc938fd5a5718db0c9c10bacac344b80
|
||||
|
@ -1 +1 @@
|
||||
b5a57b812fd6a734cf2a342bf0b730ae18912d73
|
||||
7558a0ad2276e91f2faced8ea405d9fdb4fa0c6e
|
Loading…
Reference in New Issue
Block a user