return SQLITE_OK;
}
-
-/*
-** The following three functions:
-**
-** fts3EvalPhraseStart()
-** fts3EvalPhraseNext()
-**
-** May be used with a phrase object after fts3EvalAllocateReaders() has been
-** called to iterate through the set of docids that match the phrase.
-**
-** After a successful call to fts3EvalPhraseNext(), the following two
-** functions may be called to access the current docid and position-list.
-*/
-
-
/*
** This function is called for each Fts3Phrase in a full-text query
** expression to initialize the mechanism for returning rows. Once this
}
}
-static void fts3EvalUpdateCounts(
- Fts3Cursor *pCsr,
- Fts3Expr *pExpr,
- int *pRc
-){
- if( pExpr && *pRc==SQLITE_OK ){
+/*
+** After allocating the Fts3Expr.aMI[] array for each phrase in the
+** expression rooted at pExpr, the cursor iterates through all rows matched
+** by pExpr, calling this function for each row. This function increments
+** the values in Fts3Expr.aMI[] according to the position-list currently
+** found in Fts3Expr.pPhrase->doclist.pList for each of the phrase
+** expression nodes.
+*/
+static void fts3EvalUpdateCounts(Fts3Expr *pExpr){
+ if( pExpr ){
Fts3Phrase *pPhrase = pExpr->pPhrase;
if( pPhrase && pPhrase->doclist.pList ){
int iCol = 0;
}
}
- fts3EvalUpdateCounts(pCsr, pExpr->pLeft, pRc);
- fts3EvalUpdateCounts(pCsr, pExpr->pRight, pRc);
+ fts3EvalUpdateCounts(pExpr->pLeft);
+ fts3EvalUpdateCounts(pExpr->pRight);
}
}
+/*
+** Expression pExpr must be of type FTSQUERY_PHRASE.
+**
+** If it is not already allocated and populated, this function allocates and
+** populates the Fts3Expr.aMI[] array for expression pExpr. If pExpr is part
+** of a NEAR expression, then it also allocates and populates the same array
+** for all other phrases that are part of the NEAR expression.
+**
+** SQLITE_OK is returned if the aMI[] array is successfully allocated and
+** populated. Otherwise, if an error occurs, an SQLite error code is returned.
+*/
static int fts3EvalGatherStats(
- Fts3Cursor *pCsr,
- Fts3Expr *pExpr
+ Fts3Cursor *pCsr, /* Cursor object */
+ Fts3Expr *pExpr /* FTSQUERY_PHRASE expression */
){
int rc = SQLITE_OK; /* Return code */
&& fts3EvalLoadDeferred(pCsr, &rc)
);
- if( pCsr->isEof==0 ){
- fts3EvalUpdateCounts(pCsr, pRoot, &rc);
+ if( rc==SQLITE_OK && pCsr->isEof==0 ){
+ fts3EvalUpdateCounts(pRoot);
}
}
-C Update\strace2.test\sto\saccount\sfor\snew\sFTS\squeries.
-D 2011-06-13T18:21:11.056
+C Remove\sunused\sparameters\sfrom\sinternal\sfts3\sfunction.
+D 2011-06-14T07:14:43.149
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in c1d7a7f4fd8da6b1815032efca950e3d5125407e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
-F ext/fts3/fts3.c 2a48945d199d5d0fe66a06c8cf73ad2f0e7a4b5f
+F ext/fts3/fts3.c f4f65273121386349993d600c4c5f710d4b3e956
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
F ext/fts3/fts3Int.h a999cfbf605efec293a88519f74192f5204c84d6
F ext/fts3/fts3_aux.c baed9dab7fb4604ae8cafdb2d7700abe93beffbe
F tool/symbols.sh bc2a3709940d47c8ac8e0a1fdf17ec801f015a00
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings.sh 347d974d143cf132f953b565fbc03026f19fcb4d
-P b9fb69e55bb05a8819688ee63987f2a05c33d59b
-R 4f421cd82a93c9e8973177e58e4c866f
+P 2c20129297b64f4113b8edb551385eb918279471
+R 24738ea4e4f82770b7e9961a6f31bf0f
U dan
-Z 2a2f406b9fac55b2e6e57d2ed45fc4da
+Z 096f5065b2f90702df92a748235d8620