1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix a broken assert() in the fts3 snippet code that was failing for queries containging more than 64 phrases.

FossilOrigin-Name: 4c01e0170e113ad052b6c3980beb4be9f1dc03fb3cf34132b90e8b82b23f654e
This commit is contained in:
dan
2019-08-21 11:31:48 +00:00
parent 35fb866ea3
commit 6fcb9f3ad9
4 changed files with 34 additions and 10 deletions

View File

@ -433,10 +433,10 @@ static void fts3SnippetDetails(
while( iCsr<(iStart+pIter->nSnippet) && iCsr>=iStart ){
int j;
u64 mPhrase = (u64)1 << i;
u64 mPhrase = (u64)1 << (i%64);
u64 mPos = (u64)1 << (iCsr - iStart);
assert( iCsr>=iStart && (iCsr - iStart)<=64 );
assert( i>=0 && i<=64 );
assert( i>=0 );
if( (mCover|mCovered)&mPhrase ){
iScore++;
}else{