Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: third_party/sqlite/patches/0013-fts2-Interpret-foo-as-a-prefix-search.patch

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 From 07efd3db8276f343fa9762a11ca3114ba8ffe532 Mon Sep 17 00:00:00 2001 1 From b3310ec4e29ca2ef45e36a7b188503cd2637c8ba Mon Sep 17 00:00:00 2001
2 From: Matt Perry <mpcomplete@google.com> 2 From: Matt Perry <mpcomplete@google.com>
3 Date: Wed, 17 Dec 2008 00:50:50 +0000 3 Date: Wed, 17 Dec 2008 00:50:50 +0000
4 Subject: [PATCH 20/23] [fts2] Interpret "foo*" as a prefix search. 4 Subject: [PATCH 13/16] [fts2] Interpret "foo*" as a prefix search.
5 5
6 By default it interpreted it as "foo *" (two tokens). 6 By default it interpreted it as "foo *" (two tokens).
7 7
8 Original review URL: http://codereview.chromium.org/14176 8 Original review URL: http://codereview.chromium.org/14176
9 --- 9 ---
10 third_party/sqlite/src/ext/fts2/fts2.c | 15 +++++++++++++++ 10 third_party/sqlite/src/ext/fts2/fts2.c | 15 +++++++++++++++
11 1 file changed, 15 insertions(+) 11 1 file changed, 15 insertions(+)
12 12
13 diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext /fts2/fts2.c 13 diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext /fts2/fts2.c
14 index 4945cd9..7d07137 100644 14 index 944f324..1c68af5 100644
15 --- a/third_party/sqlite/src/ext/fts2/fts2.c 15 --- a/third_party/sqlite/src/ext/fts2/fts2.c
16 +++ b/third_party/sqlite/src/ext/fts2/fts2.c 16 +++ b/third_party/sqlite/src/ext/fts2/fts2.c
17 @@ -3558,6 +3558,7 @@ static int tokenizeSegment( 17 @@ -3558,6 +3558,7 @@ static int tokenizeSegment(
18 int firstIndex = pQuery->nTerms; 18 int firstIndex = pQuery->nTerms;
19 int iCol; 19 int iCol;
20 int nTerm = 1; 20 int nTerm = 1;
21 + int iEndLast = -1; 21 + int iEndLast = -1;
22 22
23 int rc = pModule->xOpen(pTokenizer, pSegment, nSegment, &pCursor); 23 int rc = pModule->xOpen(pTokenizer, pSegment, nSegment, &pCursor);
24 if( rc!=SQLITE_OK ) return rc; 24 if( rc!=SQLITE_OK ) return rc;
(...skipping 14 matching lines...) Expand all
39 + continue; 39 + continue;
40 + } 40 + }
41 + iEndLast = iEnd; 41 + iEndLast = iEnd;
42 + 42 +
43 queryAdd(pQuery, pToken, nToken); 43 queryAdd(pQuery, pToken, nToken);
44 if( !inPhrase && iBegin>0 && pSegment[iBegin-1]=='-' ){ 44 if( !inPhrase && iBegin>0 && pSegment[iBegin-1]=='-' ){
45 pQuery->pTerms[pQuery->nTerms-1].isNot = 1; 45 pQuery->pTerms[pQuery->nTerms-1].isNot = 1;
46 -- 46 --
47 2.2.1 47 2.2.1
48 48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698