From: dan Date: Tue, 14 Jun 2011 07:14:43 +0000 (+0000) Subject: Remove unused parameters from internal fts3 function. X-Git-Tag: version-3.7.7~62^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=806cbfc2149da1de634c9fcf685428b732a57ca8;p=thirdparty%2Fsqlite.git Remove unused parameters from internal fts3 function. FossilOrigin-Name: 06de3f2cbc27cdfd9f83218c9ea576f74f60d07b --- diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c index 17a7b2ccaa..60b8595e84 100644 --- a/ext/fts3/fts3.c +++ b/ext/fts3/fts3.c @@ -3342,21 +3342,6 @@ static int fts3EvalDeferredPhrase(Fts3Cursor *pCsr, Fts3Phrase *pPhrase){ 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 @@ -4158,12 +4143,16 @@ static void fts3EvalRestart( } } -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; @@ -4189,14 +4178,25 @@ static void fts3EvalUpdateCounts( } } - 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 */ @@ -4248,8 +4248,8 @@ static int fts3EvalGatherStats( && fts3EvalLoadDeferred(pCsr, &rc) ); - if( pCsr->isEof==0 ){ - fts3EvalUpdateCounts(pCsr, pRoot, &rc); + if( rc==SQLITE_OK && pCsr->isEof==0 ){ + fts3EvalUpdateCounts(pRoot); } } diff --git a/manifest b/manifest index 13395c5a81..037d939c2d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -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 @@ -61,7 +61,7 @@ F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0 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 @@ -945,7 +945,7 @@ F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c 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 diff --git a/manifest.uuid b/manifest.uuid index 5186fdc744..6cb1ded47e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2c20129297b64f4113b8edb551385eb918279471 \ No newline at end of file +06de3f2cbc27cdfd9f83218c9ea576f74f60d07b \ No newline at end of file