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

Side by Side Diff: third_party/sqlite/patches/0014-fts2-Detect-and-handle-certain-corruption-cases.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 4d085cef75bf930afac74457600ddea785b6ac9d Mon Sep 17 00:00:00 2001 1 From c0a3343f2b446088f8f721baf8f53e20e8ce4fb5 Mon Sep 17 00:00:00 2001
2 From: Scott Hess <shess@chromium.org> 2 From: Scott Hess <shess@chromium.org>
3 Date: Thu, 18 Sep 2008 17:00:30 -0700 3 Date: Thu, 18 Sep 2008 17:00:30 -0700
4 Subject: [PATCH 21/23] [fts2] Detect and handle certain corruption cases. 4 Subject: [PATCH 14/16] [fts2] Detect and handle certain corruption cases.
5 5
6 Detect and handle certain corruption cases for fts2, 6 Detect and handle certain corruption cases for fts2,
7 concentrating on high-level structural issues not trying to 7 concentrating on high-level structural issues not trying to
8 detect corruption when decoding, for now. These cases handle 8 detect corruption when decoding, for now. These cases handle
9 all the in-the-wild corruption examples I have but one. 9 all the in-the-wild corruption examples I have but one.
10 10
11 - During a query, detect when the fts index references a docid 11 - During a query, detect when the fts index references a docid
12 which doesn't exist in the content table. 12 which doesn't exist in the content table.
13 13
14 - Detect when leavesReaderInit() receives an empty leaf node, 14 - Detect when leavesReaderInit() receives an empty leaf node,
(...skipping 11 matching lines...) Expand all
26 previously part of an fts table (as if a page from another 26 previously part of an fts table (as if a page from another
27 table were re-used). 27 table were re-used).
28 28
29 Original Gears CL: 29 Original Gears CL:
30 https://code.google.com/p/gears/source/detail?r=2855&path=/trunk/third_party/sql ite_google/ext/fts2/fts2.c 30 https://code.google.com/p/gears/source/detail?r=2855&path=/trunk/third_party/sql ite_google/ext/fts2/fts2.c
31 --- 31 ---
32 third_party/sqlite/src/ext/fts2/fts2.c | 152 ++++++++++++++++++++++++++++----- 32 third_party/sqlite/src/ext/fts2/fts2.c | 152 ++++++++++++++++++++++++++++-----
33 1 file changed, 132 insertions(+), 20 deletions(-) 33 1 file changed, 132 insertions(+), 20 deletions(-)
34 34
35 diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext /fts2/fts2.c 35 diff --git a/third_party/sqlite/src/ext/fts2/fts2.c b/third_party/sqlite/src/ext /fts2/fts2.c
36 index 7d07137..bdbd747 100644 36 index 1c68af5..5cb3fc6 100644
37 --- a/third_party/sqlite/src/ext/fts2/fts2.c 37 --- a/third_party/sqlite/src/ext/fts2/fts2.c
38 +++ b/third_party/sqlite/src/ext/fts2/fts2.c 38 +++ b/third_party/sqlite/src/ext/fts2/fts2.c
39 @@ -349,6 +349,16 @@ 39 @@ -349,6 +349,16 @@
40 # define TRACE(A) 40 # define TRACE(A)
41 #endif 41 #endif
42 42
43 +#if 0 43 +#if 0
44 +/* Useful to set breakpoints. See main.c sqlite3Corrupt(). */ 44 +/* Useful to set breakpoints. See main.c sqlite3Corrupt(). */
45 +static int fts2Corrupt(void){ 45 +static int fts2Corrupt(void){
46 + return SQLITE_CORRUPT; 46 + return SQLITE_CORRUPT;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 + } 300 + }
301 + 301 +
302 + rc = leavesReaderInit(v, 0, iStartBlockid, iEndBlockid, 302 + rc = leavesReaderInit(v, 0, iStartBlockid, iEndBlockid,
303 + pRootData, nRootData, &reader); 303 + pRootData, nRootData, &reader);
304 if( rc!=SQLITE_OK ) return rc; 304 if( rc!=SQLITE_OK ) return rc;
305 305
306 while( rc==SQLITE_OK && !leavesReaderAtEnd(&reader) ){ 306 while( rc==SQLITE_OK && !leavesReaderAtEnd(&reader) ){
307 -- 307 --
308 2.2.1 308 2.2.1
309 309
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698