]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Rearrange code in fts5_expr.c so that synonym support does not slow down the common...
authordan <dan@noemail.net>
Thu, 3 Sep 2015 19:48:02 +0000 (19:48 +0000)
committerdan <dan@noemail.net>
Thu, 3 Sep 2015 19:48:02 +0000 (19:48 +0000)
FossilOrigin-Name: 801882817f1d895aef1426f9a7196bd140b807c3

ext/fts5/fts5_expr.c
manifest
manifest.uuid

index ea5fd8a09e997a1678a17310d6111239f0f7fc59..b68634694f70b7402cf091316aaab0e05827761b 100644 (file)
@@ -1181,10 +1181,17 @@ static int fts5ExprNodeNext(
       };
 
       case FTS5_TERM: {
-        rc = fts5ExprNearAdvanceFirst(pExpr, pNode, bFromValid, iFrom);
-        if( pNode->bEof==0 ){
+        Fts5IndexIter *pIter = pNode->pNear->apPhrase[0]->aTerm[0].pIter;
+        if( bFromValid ){
+          rc = sqlite3Fts5IterNextFrom(pIter, iFrom);
+        }else{
+          rc = sqlite3Fts5IterNext(pIter);
+        }
+        if( rc==SQLITE_OK && sqlite3Fts5IterEof(pIter)==0 ){
           assert( rc==SQLITE_OK );
           rc = fts5ExprTokenTest(pExpr, pNode);
+        }else{
+          pNode->bEof = 1;
         }
         return rc;
       };
index b7ec71865dcf60ef23ad9370a1ff69821c6345fb..20d7c879fcd5a327d0b56f40c0159701c04ca51a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Merge\senhancements\sfrom\strunk.
-D 2015-09-03T18:57:52.309
+C Rearrange\scode\sin\sfts5_expr.c\sso\sthat\ssynonym\ssupport\sdoes\snot\sslow\sdown\sthe\scommon\scase.
+D 2015-09-03T19:48:02.456
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -110,7 +110,7 @@ F ext/fts5/fts5Int.h f65d41f66accad0a289d6bd66b13c07d2932f9be
 F ext/fts5/fts5_aux.c 7a307760a9c57c750d043188ec0bad59f5b5ec7e
 F ext/fts5/fts5_buffer.c 80f9ba4431848cb857e3d2158f5280093dcd8015
 F ext/fts5/fts5_config.c 80b61fd2c6844b64a3e72a64572d50a812da9384
-F ext/fts5/fts5_expr.c 0c36c1db8eccdeb006e3c8d1499d05015f6e11a6
+F ext/fts5/fts5_expr.c 1c24e1a2ffb286bfe37e537a43b7fadabfe993d4
 F ext/fts5/fts5_hash.c 4bf4b99708848357b8a2b5819e509eb6d3df9246
 F ext/fts5/fts5_index.c febb68173333ae3248eb15928a18b21112d45135
 F ext/fts5/fts5_main.c e9d0892424bb7f0a8b58613d4ff75cb650cf286e
@@ -1382,7 +1382,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 58aa1f435959852df74f1bca8e0bdbc4f47c256a 618d8dd4ff44cce10cc4688a2134715ff66cc562
-R 38e68c75949f5efa3d52c01a80d7f0aa
+P 4b49fe996989fe42d2bb1c24e7193fef09c5fc50
+R 0fe79065145fa2e8621202f9c4e41627
 U dan
-Z 9f85937304cd0ef1147cd11d7113913e
+Z fe72ec30c1ce282b0a02c9b8970f9360
index d9cd6ed6807cc7890c6950dddcaff2b7a3e6e37b..005faca75400a97579de8c100937200df1fd5e56 100644 (file)
@@ -1 +1 @@
-4b49fe996989fe42d2bb1c24e7193fef09c5fc50
\ No newline at end of file
+801882817f1d895aef1426f9a7196bd140b807c3
\ No newline at end of file