Remove some dead code from fts3_snippet.c.
FossilOrigin-Name: 46b2d3cef5c22a9e6bd0a4f8411f17b7ec72bd18
This commit is contained in:
parent
e60aedc564
commit
739b903e6d
@ -238,8 +238,6 @@ static void fts3GetDeltaPosition(char **pp, int *piPos){
|
||||
*piPos += (iVal-2);
|
||||
}
|
||||
|
||||
static int fts3ExprLHitsCb(Fts3Expr*, int, void*);
|
||||
|
||||
/*
|
||||
** Helper function for fts3ExprIterate() (see below).
|
||||
*/
|
||||
@ -250,11 +248,8 @@ static int fts3ExprIterate2(
|
||||
void *pCtx /* Second argument to pass to callback */
|
||||
){
|
||||
int rc; /* Return code */
|
||||
|
||||
if( x==fts3ExprLHitsCb && pExpr->bEof ){
|
||||
rc = SQLITE_OK;
|
||||
}else{
|
||||
int eType = pExpr->eType; /* Type of expression node pExpr */
|
||||
|
||||
if( eType!=FTSQUERY_PHRASE ){
|
||||
assert( pExpr->pLeft && pExpr->pRight );
|
||||
rc = fts3ExprIterate2(pExpr->pLeft, piPhrase, x, pCtx);
|
||||
@ -265,7 +260,6 @@ static int fts3ExprIterate2(
|
||||
rc = x(pExpr, *piPhrase, pCtx);
|
||||
(*piPhrase)++;
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -975,54 +969,6 @@ static int fts3ExprLocalHitsCb(
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** fts3ExprIterate() callback used to gather information for the matchinfo
|
||||
** directives 'y' and 'b'.
|
||||
*/
|
||||
static int fts3ExprLHitsCb(
|
||||
Fts3Expr *pExpr, /* Phrase expression node */
|
||||
int iPhrase, /* Phrase number */
|
||||
void *pCtx /* Pointer to MatchInfo structure */
|
||||
){
|
||||
int rc = SQLITE_OK;
|
||||
MatchInfo *p = (MatchInfo *)pCtx;
|
||||
|
||||
/* This must be a phrase */
|
||||
assert( pExpr->pPhrase );
|
||||
|
||||
if( pExpr->iDocid==p->pCursor->iPrevId ){
|
||||
Fts3Table *pTab = (Fts3Table *)p->pCursor->base.pVtab;
|
||||
int iStart;
|
||||
Fts3Phrase *pPhrase = pExpr->pPhrase;
|
||||
char *pIter = pPhrase->doclist.pList;
|
||||
int iCol = 0;
|
||||
|
||||
assert( p->flag==FTS3_MATCHINFO_LHITS_BM || p->flag==FTS3_MATCHINFO_LHITS );
|
||||
if( p->flag==FTS3_MATCHINFO_LHITS ){
|
||||
iStart = iPhrase * p->nCol;
|
||||
}else{
|
||||
iStart = iPhrase * ((p->nCol + 31) / 32);
|
||||
}
|
||||
|
||||
while( 1 ){
|
||||
int nHit = fts3ColumnlistCount(&pIter);
|
||||
if( (pPhrase->iColumn>=pTab->nColumn || pPhrase->iColumn==iCol) ){
|
||||
if( p->flag==FTS3_MATCHINFO_LHITS ){
|
||||
p->aMatchinfo[iStart + iCol] = (u32)nHit;
|
||||
}else if( nHit ){
|
||||
p->aMatchinfo[iStart + (iCol+1)/32] |= (1 << (iCol&0x1F));
|
||||
}
|
||||
}
|
||||
assert( *pIter==0x00 || *pIter==0x01 );
|
||||
if( *pIter!=0x01 ) break;
|
||||
pIter++;
|
||||
pIter += fts3GetVarint32(pIter, &iCol);
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int fts3MatchinfoCheck(
|
||||
Fts3Table *pTab,
|
||||
char cArg,
|
||||
|
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C More\soptimization\sfor\sthe\s'y'\sand\s'b'\smatchinfo\sdirectives.
|
||||
D 2015-05-06T17:41:19.953
|
||||
C Remove\ssome\sdead\scode\sfrom\sfts3_snippet.c.
|
||||
D 2015-05-06T17:51:59.283
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 08728ecbeddca339c77bfd564d3484b523dffdb1
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -87,7 +87,7 @@ F ext/fts3/fts3_hash.c 29b986e43f4e9dd40110eafa377dc0d63c422c60
|
||||
F ext/fts3/fts3_hash.h 39cf6874dc239d6b4e30479b1975fe5b22a3caaf
|
||||
F ext/fts3/fts3_icu.c e319e108661147bcca8dd511cd562f33a1ba81b5
|
||||
F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009
|
||||
F ext/fts3/fts3_snippet.c aa922977437794f1db44153a3641dc13532d70bf
|
||||
F ext/fts3/fts3_snippet.c b7aaa8698096b26e1c6eb563e317409323398142
|
||||
F ext/fts3/fts3_term.c 88c55a6fa1a51ab494e33dced0401a6c28791fd7
|
||||
F ext/fts3/fts3_test.c 8a3a78c4458b2d7c631fcf4b152a5cd656fa7038
|
||||
F ext/fts3/fts3_tokenize_vtab.c a27593ab19657166f6fa5ec073b678cc29a75860
|
||||
@ -1256,7 +1256,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P fbd038bb57322e1ed2e1ee52f3d134594b6bfcc0
|
||||
R 780f3f117425896614672c37a51cec34
|
||||
P 8c5b9fedfcee3ac22a222819dceb981ad94a9903
|
||||
R 9c0ae1ced8b4f8180762181541a87277
|
||||
U dan
|
||||
Z 685754dfb55ce5a995c9773000dc4c01
|
||||
Z 598498d40245cf3b5c2dae507eb1e6dd
|
||||
|
@ -1 +1 @@
|
||||
8c5b9fedfcee3ac22a222819dceb981ad94a9903
|
||||
46b2d3cef5c22a9e6bd0a4f8411f17b7ec72bd18
|
Loading…
x
Reference in New Issue
Block a user