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

Side by Side Diff: third_party/sqlite/misc.patch

Issue 5626002: Update sqlite to 3.7.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/third_party/sqlite/src
Patch Set: Remove misc change. Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/icu-regexp.patch ('k') | third_party/sqlite/preload-cache.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Index: Makefile.linux-gcc 1 diff --git a/third_party/sqlite/src/Makefile.linux-gcc b/third_party/sqlite/src/ Makefile.linux-gcc
2 =================================================================== 2 index 1c9f24f..de9d717 100644
3 --- Makefile.linux-gcc» 2009-09-03 13:32:06.000000000 -0700 3 --- a/third_party/sqlite/src/Makefile.linux-gcc
4 +++ Makefile.linux-gcc» 2009-07-01 12:08:39.000000000 -0700 4 +++ b/third_party/sqlite/src/Makefile.linux-gcc
5 @@ -14,7 +14,7 @@ 5 @@ -14,7 +14,7 @@
6 #### The toplevel directory of the source tree. This is the directory 6 #### The toplevel directory of the source tree. This is the directory
7 # that contains this "Makefile.in" and the "configure.in" script. 7 # that contains this "Makefile.in" and the "configure.in" script.
8 # 8 #
9 -TOP = ../sqlite 9 -TOP = ../sqlite
10 +TOP = .. 10 +TOP = ..
11 11
12 #### C Compiler and options for use in building executables that 12 #### C Compiler and options for use in building executables that
13 # will run on the platform that is doing the build. 13 # will run on the platform that is doing the build.
14 @@ -33,13 +33,13 @@ 14 @@ -33,13 +33,13 @@ USLEEP = -DHAVE_USLEEP=1
15 # appropriately: 15 # appropriately:
16 # 16 #
17 #THREADSAFE = -DTHREADSAFE=1 17 #THREADSAFE = -DTHREADSAFE=1
18 -THREADSAFE = -DTHREADSAFE=0 18 -THREADSAFE = -DTHREADSAFE=0
19 +THREADSAFE = -DTHREADSAFE=1 19 +THREADSAFE = -DTHREADSAFE=1
20 20
21 #### Specify any extra linker options needed to make the library 21 #### Specify any extra linker options needed to make the library
22 # thread safe 22 # thread safe
23 # 23 #
24 #THREADLIB = -lpthread 24 #THREADLIB = -lpthread
25 -THREADLIB = 25 -THREADLIB =
26 +THREADLIB = -lpthread 26 +THREADLIB = -lpthread
27 27
28 #### Specify any extra libraries needed to access required functions. 28 #### Specify any extra libraries needed to access required functions.
29 # 29 #
30 @@ -57,8 +57,29 @@ 30 @@ -57,8 +57,29 @@ TLIBS =
31 #OPTS = -DSQLITE_DEBUG=2 31 #OPTS = -DSQLITE_DEBUG=2
32 #OPTS = -DSQLITE_DEBUG=1 32 #OPTS = -DSQLITE_DEBUG=1
33 #OPTS = 33 #OPTS =
34 -OPTS = -DNDEBUG=1 34 -OPTS = -DNDEBUG=1
35 -OPTS += -DHAVE_FDATASYNC=1 35 -OPTS += -DHAVE_FDATASYNC=1
36 + 36 +
37 +# These flags match those for SQLITE_CFLAGS in config.mk. 37 +# These flags match those for SQLITE_CFLAGS in config.mk.
38 + 38 +
39 +OPTS += -DNDEBUG 39 +OPTS += -DNDEBUG
40 +OPTS += -DSQLITE_CORE 40 +OPTS += -DSQLITE_CORE
(...skipping 11 matching lines...) Expand all
52 +# -DSQLITE_OMIT_VACUUM=1 \ 52 +# -DSQLITE_OMIT_VACUUM=1 \
53 +# -DSQLITE_TRANSACTION_DEFAULT_IMMEDIATE=1 \ 53 +# -DSQLITE_TRANSACTION_DEFAULT_IMMEDIATE=1 \
54 + 54 +
55 +SHELL_ICU = $(TOP)/src/shell_icu_linux.c -licuuc 55 +SHELL_ICU = $(TOP)/src/shell_icu_linux.c -licuuc
56 + 56 +
57 +# TODO(shess) I can't see why I need this setting. 57 +# TODO(shess) I can't see why I need this setting.
58 +OPTS += -DOS_UNIX=1 58 +OPTS += -DOS_UNIX=1
59 59
60 #### The suffix to add to executable files. ".exe" for windows. 60 #### The suffix to add to executable files. ".exe" for windows.
61 # Nothing for unix. 61 # Nothing for unix.
62 @@ -91,16 +112,16 @@ 62 @@ -91,16 +112,16 @@ SHPREFIX = lib
63 63
64 #### Extra compiler options needed for programs that use the TCL library. 64 #### Extra compiler options needed for programs that use the TCL library.
65 # 65 #
66 -#TCL_FLAGS = 66 -#TCL_FLAGS =
67 +TCL_FLAGS = -I/usr/include/tcl8.4 67 +TCL_FLAGS = -I/usr/include/tcl8.4
68 #TCL_FLAGS = -DSTATIC_BUILD=1 68 #TCL_FLAGS = -DSTATIC_BUILD=1
69 -TCL_FLAGS = -I/home/drh/tcltk/8.4linux 69 -TCL_FLAGS = -I/home/drh/tcltk/8.5linux
70 +#TCL_FLAGS = -I/home/drh/tcltk/8.4linux 70 +#TCL_FLAGS = -I/home/drh/tcltk/8.5linux
71 #TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1 71 #TCL_FLAGS = -I/home/drh/tcltk/8.5win -DSTATIC_BUILD=1
72 #TCL_FLAGS = -I/home/drh/tcltk/8.3hpux 72 #TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
73 73
74 #### Linker options needed to link against the TCL library. 74 #### Linker options needed to link against the TCL library.
75 # 75 #
76 -#LIBTCL = -ltcl -lm -ldl 76 -#LIBTCL = -ltcl -lm -ldl
77 -LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl 77 -LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl
78 +LIBTCL = -ltcl8.4 -lm -ldl 78 +LIBTCL = -ltcl8.4 -lm -ldl
79 +#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl 79 +#LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl
80 #LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt 80 #LIBTCL = /home/drh/tcltk/8.5win/libtcl85s.a -lmsvcrt
81 #LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc 81 #LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
82 82
83 Index: ext/fts1/fts1.c 83 diff --git a/third_party/sqlite/src/ext/fts1/fts1.c b/third_party/sqlite/src/ext /fts1/fts1.c
84 =================================================================== 84 index d5429ff..8ae8df4 100644
85 --- ext/fts1/fts1.c» 2009-09-04 13:37:41.000000000 -0700 85 --- a/third_party/sqlite/src/ext/fts1/fts1.c
86 +++ ext/fts1/fts1.c» 2009-09-14 18:16:55.000000000 -0700 86 +++ b/third_party/sqlite/src/ext/fts1/fts1.c
87 @@ -1225,10 +1225,6 @@ 87 @@ -1225,10 +1225,6 @@ static int sql_step_statement(fulltext_vtab *v, fulltext_ statement iStmt,
88 break; 88 break;
89 } 89 }
90 return rc; 90 return rc;
91 - 91 -
92 - err: 92 - err:
93 - sqlite3_finalize(s); 93 - sqlite3_finalize(s);
94 - return rc; 94 - return rc;
95 } 95 }
96 96
97 /* Like sql_step_statement(), but convert SQLITE_DONE to SQLITE_OK. 97 /* Like sql_step_statement(), but convert SQLITE_DONE to SQLITE_OK.
98 Index: ext/icu/icu.c 98 diff --git a/third_party/sqlite/src/ext/icu/icu.c b/third_party/sqlite/src/ext/i cu/icu.c
99 =================================================================== 99 index e99f142..2e2251c 100644
100 --- ext/icu/icu.c» 2009-09-03 13:32:06.000000000 -0700 100 --- a/third_party/sqlite/src/ext/icu/icu.c
101 +++ ext/icu/icu.c» 2009-07-01 12:08:37.000000000 -0700 101 +++ b/third_party/sqlite/src/ext/icu/icu.c
102 @@ -38,6 +38,11 @@ 102 @@ -38,6 +38,11 @@
103 103
104 #include <assert.h> 104 #include <assert.h>
105 105
106 +// TODO(evanm): this is cut'n'pasted from fts2.c. Why is it necessary? 106 +// TODO(evanm): this is cut'n'pasted from fts2.c. Why is it necessary?
107 +#if !defined(SQLITE_CORE) 107 +#if !defined(SQLITE_CORE)
108 +# define SQLITE_CORE 1 108 +# define SQLITE_CORE 1
109 +#endif 109 +#endif
110 + 110 +
111 #ifndef SQLITE_CORE 111 #ifndef SQLITE_CORE
112 #include "sqlite3ext.h" 112 #include "sqlite3ext.h"
113 SQLITE_EXTENSION_INIT1 113 SQLITE_EXTENSION_INIT1
114 Index: main.mk 114 diff --git a/third_party/sqlite/src/src/expr.c b/third_party/sqlite/src/src/expr .c
115 =================================================================== 115 index 41be162..30f0434 100644
116 --- main.mk» 2009-09-10 12:18:17.000000000 -0700 116 --- a/third_party/sqlite/src/src/expr.c
117 +++ main.mk» 2009-09-15 11:45:21.000000000 -0700 117 +++ b/third_party/sqlite/src/src/expr.c
118 @@ -69,6 +69,16 @@ 118 @@ -775,7 +775,9 @@ static Expr *exprDup(sqlite3 *db, Expr *p, int flags, u8 **p zBuffer){
119 walker.o where.o utf.o vtab.o
120
121
122 +LIBOBJ += fts1.o \
123 +» fts1_hash.o \
124 +» fts1_tokenizer1.o \
125 +» fts1_porter.o
126 +LIBOBJ += fts2.o \
127 +» fts2_hash.o \
128 +» fts2_icu.o \
129 +» fts2_porter.o \
130 + fts2_tokenizer.o \
131 +» fts2_tokenizer1.o
132
133 # All of the source code files.
134 #
135 @@ -243,6 +253,25 @@
136 $(TOP)/src/test_thread.c \
137 $(TOP)/src/test_wsd.c
138
139 +TESTSRC += \
140 + $(TOP)/ext/fts1/fts1.c \
141 + $(TOP)/ext/fts1/fts1.h \
142 + $(TOP)/ext/fts1/fts1_hash.c \
143 + $(TOP)/ext/fts1/fts1_hash.h \
144 + $(TOP)/ext/fts1/fts1_porter.c \
145 + $(TOP)/ext/fts1/fts1_tokenizer.h \
146 + $(TOP)/ext/fts1/fts1_tokenizer1.c
147 +TESTSRC += \
148 + $(TOP)/ext/fts2/fts2.c \
149 + $(TOP)/ext/fts2/fts2.h \
150 + $(TOP)/ext/fts2/fts2_hash.c \
151 + $(TOP)/ext/fts2/fts2_hash.h \
152 + $(TOP)/ext/fts2/fts2_icu.c \
153 + $(TOP)/ext/fts2/fts2_porter.c \
154 + $(TOP)/ext/fts2/fts2_tokenizer.h \
155 + $(TOP)/ext/fts2/fts2_tokenizer.c \
156 + $(TOP)/ext/fts2/fts2_tokenizer1.c
157 +
158 #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
159 #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
160
161 @@ -314,8 +343,8 @@
162
163 sqlite3$(EXE):»$(TOP)/src/shell.c libsqlite3.a sqlite3.h
164 » $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
165 -» » $(TOP)/src/shell.c \
166 -» » libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
167 +» » $(TOP)/src/shell.c $(SHELL_ICU) \
168 +» » libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) -ldl
169
170 objects: $(LIBOBJ_ORIG)
171
172 @@ -447,6 +476,20 @@
173 » $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
174
175
176 +
177 +
178 +fts1.o:» $(TOP)/ext/fts1/fts1.c $(HDR) $(EXTHDR)
179 +» $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts1/fts1.c
180 +
181 +fts1_hash.o:» $(TOP)/ext/fts1/fts1_hash.c $(HDR) $(EXTHDR)
182 +» $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts1/fts1_hash.c
183 +
184 +fts1_tokenizer1.o:» $(TOP)/ext/fts1/fts1_tokenizer1.c $(HDR) $(EXTHDR)
185 +» $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts1/fts1_tokenizer1.c
186 +
187 +fts1_porter.o:»$(TOP)/ext/fts1/fts1_porter.c $(HDR) $(EXTHDR)
188 +» $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts1/fts1_porter.c
189 +
190 # Rules for building test programs and for running tests
191 #
192 tclsqlite3:» $(TOP)/src/tclsqlite.c libsqlite3.a
193 @@ -484,6 +527,15 @@
194 test:» testfixture$(EXE) sqlite3$(EXE)
195 » ./testfixture$(EXE) $(TOP)/test/veryquick.test
196
197 +ftstest:» testfixture$(EXE) sqlite3$(EXE)
198 +» ./testfixture$(EXE) $(TOP)/test/fts.test
199 +
200 +fts1test:» testfixture$(EXE) sqlite3$(EXE)
201 +» ./testfixture$(EXE) $(TOP)/test/fts1.test
202 +
203 +fts2test:» testfixture$(EXE) sqlite3$(EXE)
204 +» ./testfixture$(EXE) $(TOP)/test/fts2.test
205 +
206 sqlite3_analyzer$(EXE):» $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
207 » » » $(TOP)/tool/spaceanal.tcl
208 » sed \
209 Index: src/expr.c
210 ===================================================================
211 --- src/expr.c» 2009-09-08 12:16:11.000000000 -0700
212 +++ src/expr.c» 2009-09-23 16:58:47.000000000 -0700
213 @@ -804,7 +804,9 @@
214 }else{ 119 }else{
215 int nSize = exprStructSize(p); 120 int nSize = exprStructSize(p);
216 memcpy(zAlloc, p, nSize); 121 memcpy(zAlloc, p, nSize);
217 - memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize); 122 - memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);
218 + if( EXPR_FULLSIZE>nSize ){ 123 + if( EXPR_FULLSIZE>nSize ){
219 + memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize); 124 + memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);
220 + } 125 + }
221 } 126 }
222 127
223 /* Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. * / 128 /* Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. * /
224 Index: src/func.c 129 diff --git a/third_party/sqlite/src/src/func.c b/third_party/sqlite/src/src/func .c
225 =================================================================== 130 index 8b7086f..5c56a79 100644
226 --- src/func.c» 2009-09-04 13:37:42.000000000 -0700 131 --- a/third_party/sqlite/src/src/func.c
227 +++ src/func.c» 2009-09-14 18:18:18.000000000 -0700 132 +++ b/third_party/sqlite/src/src/func.c
228 @@ -1020,7 +1020,7 @@ 133 @@ -1114,7 +1114,7 @@ static void trimFunc(
229 } 134 }
230 } 135 }
231 if( zCharSet ){ 136 if( zCharSet ){
232 - sqlite3_free(azChar); 137 - sqlite3_free(azChar);
233 + sqlite3_free((void*)azChar); 138 + sqlite3_free((void*)azChar);
234 } 139 }
235 } 140 }
236 sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT); 141 sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT);
237 Index: src/os.h 142 diff --git a/third_party/sqlite/src/src/os.h b/third_party/sqlite/src/src/os.h
238 =================================================================== 143 index 7f17c20..6d6486f 100644
239 --- src/os.h» 2009-09-04 13:37:42.000000000 -0700 144 --- a/third_party/sqlite/src/src/os.h
240 +++ src/os.h» 2009-09-14 18:18:24.000000000 -0700 145 +++ b/third_party/sqlite/src/src/os.h
241 @@ -29,6 +29,10 @@ 146 @@ -27,6 +27,10 @@
242 ** will defined to either 1 or 0. One of the four will be 1. The other 147 ** will defined to either 1 or 0. One of the four will be 1. The other
243 ** three will be 0. 148 ** three will be 0.
244 */ 149 */
245 +#ifdef OS_SYMBIAN 150 +#ifdef OS_SYMBIAN
246 +# define SQLITE_OS_SYMBIAN 1 151 +# define SQLITE_OS_SYMBIAN 1
247 +# define SQLITE_OS_OTHER 1 152 +# define SQLITE_OS_OTHER 1
248 +#endif 153 +#endif
249 #if defined(SQLITE_OS_OTHER) 154 #if defined(SQLITE_OS_OTHER)
250 # if SQLITE_OS_OTHER==1 155 # if SQLITE_OS_OTHER==1
251 # undef SQLITE_OS_UNIX 156 # undef SQLITE_OS_UNIX
252 Index: src/os_unix.c 157 diff --git a/third_party/sqlite/src/src/os_unix.c b/third_party/sqlite/src/src/o s_unix.c
253 =================================================================== 158 index 2b38fd6..4717d48 100644
254 --- src/os_unix.c» 2009-09-10 12:14:55.000000000 -0700 159 --- a/third_party/sqlite/src/src/os_unix.c
255 +++ src/os_unix.c» 2009-09-15 16:50:43.000000000 -0700 160 +++ b/third_party/sqlite/src/src/os_unix.c
256 @@ -3215,6 +3215,7 @@ 161 @@ -3769,6 +3769,7 @@ static int unixShmUnmap(
257 ********************** End sqlite3_file Methods ******************************* 162 ********************** End sqlite3_file Methods *******************************
258 ******************************************************************************/ 163 ******************************************************************************/
259 164
260 + 165 +
261 /* 166 /*
262 ** This division contains definitions of sqlite3_io_methods objects that 167 ** This division contains definitions of sqlite3_io_methods objects that
263 ** implement various file locking strategies. It also contains definitions 168 ** implement various file locking strategies. It also contains definitions
264 @@ -3496,9 +3497,16 @@ 169 @@ -4055,9 +4056,16 @@ typedef const sqlite3_io_methods *(*finder_type)(const ch ar*,unixFile*);
265 */ 170 */
266 171
267 /* 172 /*
268 +** Initializes a unixFile structure with zeros. 173 +** Initializes a unixFile structure with zeros.
269 +*/ 174 +*/
270 +void initUnixFile(sqlite3_file* file) { 175 +void initUnixFile(sqlite3_file* file) {
271 + memset(file, 0, sizeof(unixFile)); 176 + memset(file, 0, sizeof(unixFile));
272 +} 177 +}
273 + 178 +
274 +/* 179 +/*
275 ** Initialize the contents of the unixFile structure pointed to by pId. 180 ** Initialize the contents of the unixFile structure pointed to by pId.
276 */ 181 */
277 -static int fillInUnixFile( 182 -static int fillInUnixFile(
278 +int fillInUnixFile( 183 +int fillInUnixFile(
279 sqlite3_vfs *pVfs, /* Pointer to vfs object */ 184 sqlite3_vfs *pVfs, /* Pointer to vfs object */
280 int h, /* Open file descriptor of file being opened */ 185 int h, /* Open file descriptor of file being opened */
281 int dirfd, /* Directory file descriptor */ 186 int dirfd, /* Directory file descriptor */
282 Index: src/os_win.c 187 diff --git a/third_party/sqlite/src/src/os_win.c b/third_party/sqlite/src/src/os _win.c
283 =================================================================== 188 index 1be5149..b91ff48 100644
284 --- src/os_win.c» 2009-09-10 15:08:39.000000000 -0700 189 --- a/third_party/sqlite/src/src/os_win.c
285 +++ src/os_win.c» 2009-09-14 18:26:16.000000000 -0700 190 +++ b/third_party/sqlite/src/src/os_win.c
286 @@ -1890,4 +1890,11 @@ 191 @@ -2778,4 +2778,11 @@ int sqlite3_os_end(void){
287 return SQLITE_OK; 192 return SQLITE_OK;
288 } 193 }
289 194
290 +void chromium_sqlite3_initialize_win_sqlite3_file(sqlite3_file* file, HANDLE ha ndle) { 195 +void chromium_sqlite3_initialize_win_sqlite3_file(sqlite3_file* file, HANDLE ha ndle) {
291 + winFile* winSQLite3File = (winFile*)file; 196 + winFile* winSQLite3File = (winFile*)file;
292 + memset(file, 0, sizeof(*file)); 197 + memset(file, 0, sizeof(*file));
293 + winSQLite3File->pMethod = &winIoMethod; 198 + winSQLite3File->pMethod = &winIoMethod;
294 + winSQLite3File->h = handle; 199 + winSQLite3File->h = handle;
295 +} 200 +}
296 + 201 +
297 #endif /* SQLITE_OS_WIN */ 202 #endif /* SQLITE_OS_WIN */
298 Index: src/pcache.c 203 diff --git a/third_party/sqlite/src/src/pcache.c b/third_party/sqlite/src/src/pc ache.c
299 =================================================================== 204 index 242f307..6dec550 100644
300 --- src/pcache.c» 2009-09-04 13:37:42.000000000 -0700 205 --- a/third_party/sqlite/src/src/pcache.c
301 +++ src/pcache.c» 2009-09-15 16:41:55.000000000 -0700 206 +++ b/third_party/sqlite/src/src/pcache.c
302 @@ -542,14 +542,12 @@ 207 @@ -553,14 +553,12 @@ int sqlite3PcachePagecount(PCache *pCache){
303 return nPage; 208 return nPage;
304 } 209 }
305 210
306 -#ifdef SQLITE_TEST 211 -#ifdef SQLITE_TEST
307 /* 212 /*
308 ** Get the suggested cache-size value. 213 ** Get the suggested cache-size value.
309 */ 214 */
310 int sqlite3PcacheGetCachesize(PCache *pCache){ 215 int sqlite3PcacheGetCachesize(PCache *pCache){
311 return pCache->nMax; 216 return pCache->nMax;
312 } 217 }
313 -#endif 218 -#endif
314 219
315 /* 220 /*
316 ** Set the suggested cache-size value. 221 ** Set the suggested cache-size value.
317 Index: src/pcache.h 222 diff --git a/third_party/sqlite/src/src/pcache.h b/third_party/sqlite/src/src/pc ache.h
318 =================================================================== 223 index 33735d2..a9bea98 100644
319 --- src/pcache.h» 2009-09-04 13:37:42.000000000 -0700 224 --- a/third_party/sqlite/src/src/pcache.h
320 +++ src/pcache.h» 2009-09-15 16:41:52.000000000 -0700 225 +++ b/third_party/sqlite/src/src/pcache.h
321 @@ -139,9 +139,7 @@ 226 @@ -137,9 +137,7 @@ void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter) (PgHdr *));
322 ** of the suggested cache-sizes. 227 ** of the suggested cache-sizes.
323 */ 228 */
324 void sqlite3PcacheSetCachesize(PCache *, int); 229 void sqlite3PcacheSetCachesize(PCache *, int);
325 -#ifdef SQLITE_TEST 230 -#ifdef SQLITE_TEST
326 int sqlite3PcacheGetCachesize(PCache *); 231 int sqlite3PcacheGetCachesize(PCache *);
327 -#endif 232 -#endif
328 233
329 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT 234 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
330 /* Try to return memory used by the pcache module to the main memory heap */ 235 /* Try to return memory used by the pcache module to the main memory heap */
331 Index: src/shell.c 236 diff --git a/third_party/sqlite/src/src/shell.c b/third_party/sqlite/src/src/she ll.c
332 =================================================================== 237 index c5aa40c..0c2adde 100644
333 --- src/shell.c»2009-09-04 13:37:43.000000000 -0700 238 --- a/third_party/sqlite/src/src/shell.c
334 +++ src/shell.c»2009-09-15 11:32:08.000000000 -0700 239 +++ b/third_party/sqlite/src/src/shell.c
335 @@ -3007,6 +3007,18 @@ 240 @@ -2525,6 +2525,18 @@ int main(int argc, char **argv){
336 int i; 241 int i;
337 int rc = 0; 242 int rc = 0;
338 243
339 + /* Begin evanm patch. */ 244 + /* Begin evanm patch. */
340 +#ifdef SQLITE_GEARS_DISABLE_SHELL_ICU 245 +#ifdef SQLITE_GEARS_DISABLE_SHELL_ICU
341 + /* Gears doesn't use this. */ 246 + /* Gears doesn't use this. */
342 +#else 247 +#else
343 + extern int sqlite_shell_init_icu(); 248 + extern int sqlite_shell_init_icu();
344 + if( !sqlite_shell_init_icu() ){ 249 + if( !sqlite_shell_init_icu() ){
345 + fprintf(stderr, "%s: warning: couldn't find icudt38.dll; " 250 + fprintf(stderr, "%s: warning: couldn't find icudt38.dll; "
346 + "queries against ICU FTS tables will fail.\n", argv[0]); 251 + "queries against ICU FTS tables will fail.\n", argv[0]);
347 + } 252 + }
348 +#endif 253 +#endif
349 + /* End evanm patch. */ 254 + /* End evanm patch. */
350 + 255 +
351 Argv0 = argv[0]; 256 Argv0 = argv[0];
352 main_init(&data); 257 main_init(&data);
353 stdin_is_interactive = isatty(0); 258 stdin_is_interactive = isatty(0);
354 Index: src/sqlite3ext.h 259 diff --git a/third_party/sqlite/src/src/sqlite3ext.h b/third_party/sqlite/src/sr c/sqlite3ext.h
355 =================================================================== 260 index 0d37bbe..1530676 100644
356 --- src/sqlite3ext.h» 2009-09-03 13:32:06.000000000 -0700 261 --- a/third_party/sqlite/src/src/sqlite3ext.h
357 +++ src/sqlite3ext.h» 2009-09-15 11:34:43.000000000 -0700 262 +++ b/third_party/sqlite/src/src/sqlite3ext.h
358 @@ -372,9 +372,15 @@ 263 @@ -370,9 +370,15 @@ struct sqlite3_api_routines {
359 #define sqlite3_next_stmt sqlite3_api->next_stmt 264 #define sqlite3_next_stmt sqlite3_api->next_stmt
360 #define sqlite3_sql sqlite3_api->sql 265 #define sqlite3_sql sqlite3_api->sql
361 #define sqlite3_status sqlite3_api->status 266 #define sqlite3_status sqlite3_api->status
362 -#endif /* SQLITE_CORE */ 267 -#endif /* SQLITE_CORE */
363 268
364 #define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0; 269 #define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api = 0;
365 #define SQLITE_EXTENSION_INIT2(v) sqlite3_api = v; 270 #define SQLITE_EXTENSION_INIT2(v) sqlite3_api = v;
366 271
367 +#else 272 +#else
368 + 273 +
369 +#define SQLITE_EXTENSION_INIT1 274 +#define SQLITE_EXTENSION_INIT1
370 +#define SQLITE_EXTENSION_INIT2(v) 275 +#define SQLITE_EXTENSION_INIT2(v)
371 + 276 +
372 +#endif /* SQLITE_CORE */ 277 +#endif /* SQLITE_CORE */
373 + 278 +
374 #endif /* _SQLITE3EXT_H_ */ 279 #endif /* _SQLITE3EXT_H_ */
375 Index: src/test_autoext.c 280 diff --git a/third_party/sqlite/src/src/test_autoext.c b/third_party/sqlite/src/ src/test_autoext.c
376 =================================================================== 281 index 6b1e297..8ff02e1 100644
377 --- src/test_autoext.c» 2009-09-03 13:32:06.000000000 -0700 282 --- a/third_party/sqlite/src/src/test_autoext.c
378 +++ src/test_autoext.c» 2009-09-15 18:14:35.000000000 -0700 283 +++ b/third_party/sqlite/src/src/test_autoext.c
379 @@ -17,7 +17,9 @@ 284 @@ -15,7 +15,9 @@
380 #include "sqlite3ext.h" 285 #include "sqlite3ext.h"
381 286
382 #ifndef SQLITE_OMIT_LOAD_EXTENSION 287 #ifndef SQLITE_OMIT_LOAD_EXTENSION
383 +#ifndef SQLITE_CORE 288 +#ifndef SQLITE_CORE
384 static SQLITE_EXTENSION_INIT1 289 static SQLITE_EXTENSION_INIT1
385 +#endif 290 +#endif
386 291
387 /* 292 /*
388 ** The sqr() SQL function returns the square of its input value. 293 ** The sqr() SQL function returns the square of its input value.
389 Index: src/quick.test 294 diff --git a/third_party/sqlite/src/src/os_symbian.cc b/third_party/sqlite/src/s rc/os_symbian.cc
390 =================================================================== 295 new file mode 100644
391 --- test/quick.test» 2009-09-04 13:37:44.000000000 -0700 296 index 0000000..5b86338
392 +++ test/quick.test» 2009-09-15 11:34:54.000000000 -0700 297 --- /dev/null
393 @@ -58,6 +58,9 @@ 298 +++ b/third_party/sqlite/src/src/os_symbian.cc
394 crash7.test
395 delete3.test
396 fts3.test
397 + fts.test
398 + fts1.test
399 + fts2.test
400 fuzz.test
401 fuzz3.test
402 fuzz_malloc.test
403 Index: src/os_symbian.cc
404 ===================================================================
405 --- src/os_symbian.cc» 1969-12-31 16:00:00.000000000 -0800
406 +++ src/os_symbian.cc» 2009-07-01 12:08:37.000000000 -0700
407 @@ -0,0 +1,579 @@ 299 @@ -0,0 +1,579 @@
408 +// Copyright 2008, Google Inc. 300 +// Copyright 2008, Google Inc.
409 +// 301 +//
410 +// Redistribution and use in source and binary forms, with or without 302 +// Redistribution and use in source and binary forms, with or without
411 +// modification, are permitted provided that the following conditions are met: 303 +// modification, are permitted provided that the following conditions are met:
412 +// 304 +//
413 +// 1. Redistributions of source code must retain the above copyright notice, 305 +// 1. Redistributions of source code must retain the above copyright notice,
414 +// this list of conditions and the following disclaimer. 306 +// this list of conditions and the following disclaimer.
415 +// 2. Redistributions in binary form must reproduce the above copyright notice , 307 +// 2. Redistributions in binary form must reproduce the above copyright notice ,
416 +// this list of conditions and the following disclaimer in the documentatio n 308 +// this list of conditions and the following disclaimer in the documentatio n
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 + sqlite3_vfs_register(&symbian_vfs, 1); 869 + sqlite3_vfs_register(&symbian_vfs, 1);
978 + return SQLITE_OK; 870 + return SQLITE_OK;
979 +} 871 +}
980 + 872 +
981 +int sqlite3_os_end(void) { 873 +int sqlite3_os_end(void) {
982 + g_fs_session.Close(); 874 + g_fs_session.Close();
983 + return SQLITE_OK; 875 + return SQLITE_OK;
984 +} 876 +}
985 + 877 +
986 +#endif /* OS_SYMBIAN*/ 878 +#endif /* OS_SYMBIAN*/
987 Index: src/shell_icu_linux.c 879 diff --git a/third_party/sqlite/src/src/shell_icu_linux.c b/third_party/sqlite/s rc/src/shell_icu_linux.c
988 =================================================================== 880 new file mode 100644
989 --- src/shell_icu_linux.c» 1969-12-31 16:00:00.000000000 -0800 881 index 0000000..8194db5
990 +++ src/shell_icu_linux.c» 2009-09-17 13:48:49.000000000 -0700 882 --- /dev/null
883 +++ b/third_party/sqlite/src/src/shell_icu_linux.c
991 @@ -0,0 +1,26 @@ 884 @@ -0,0 +1,26 @@
992 +/* Copyright 2007 Google Inc. All Rights Reserved. 885 +/* Copyright 2007 Google Inc. All Rights Reserved.
993 +**/ 886 +**/
994 + 887 +
995 +#include <limits.h> 888 +#include <limits.h>
996 +#include <unistd.h> 889 +#include <unistd.h>
997 +#include "unicode/udata.h" 890 +#include "unicode/udata.h"
998 + 891 +
999 +/* 892 +/*
1000 +** This function attempts to load the ICU data tables from a data file. 893 +** This function attempts to load the ICU data tables from a data file.
1001 +** Returns 0 on failure, nonzero on success. 894 +** Returns 0 on failure, nonzero on success.
1002 +** This a hack job of icu_utils.cc:Initialize(). It's Chrome-specific code. 895 +** This a hack job of icu_utils.cc:Initialize(). It's Chrome-specific code.
1003 +*/ 896 +*/
1004 +int sqlite_shell_init_icu() { 897 +int sqlite_shell_init_icu() {
1005 + char bin_dir[PATH_MAX + 1]; 898 + char bin_dir[PATH_MAX + 1];
1006 + int bin_dir_size = readlink("/proc/self/exe", bin_dir, PATH_MAX); 899 + int bin_dir_size = readlink("/proc/self/exe", bin_dir, PATH_MAX);
1007 + if (bin_dir_size < 0 || bin_dir_size > PATH_MAX) 900 + if (bin_dir_size < 0 || bin_dir_size > PATH_MAX)
1008 + return 0; 901 + return 0;
1009 + bin_dir[bin_dir_size] = 0;; 902 + bin_dir[bin_dir_size] = 0;;
1010 + 903 +
1011 + u_setDataDirectory(bin_dir); 904 + u_setDataDirectory(bin_dir);
1012 + // Only look for the packaged data file; 905 + // Only look for the packaged data file;
1013 + // the default behavior is to look for individual files. 906 + // the default behavior is to look for individual files.
1014 + UErrorCode err = U_ZERO_ERROR; 907 + UErrorCode err = U_ZERO_ERROR;
1015 + udata_setFileAccess(UDATA_ONLY_PACKAGES, &err); 908 + udata_setFileAccess(UDATA_ONLY_PACKAGES, &err);
1016 + return err == U_ZERO_ERROR; 909 + return err == U_ZERO_ERROR;
1017 +} 910 +}
1018 Index: src/shell_icu_win.c 911 diff --git a/third_party/sqlite/src/src/shell_icu_win.c b/third_party/sqlite/src /src/shell_icu_win.c
1019 =================================================================== 912 new file mode 100644
1020 --- src/shell_icu_win.c»1969-12-31 16:00:00.000000000 -0800 913 index 0000000..afea472
1021 +++ src/shell_icu_win.c»2009-09-09 12:29:11.000000000 -0700 914 --- /dev/null
915 +++ b/third_party/sqlite/src/src/shell_icu_win.c
1022 @@ -0,0 +1,34 @@ 916 @@ -0,0 +1,34 @@
1023 +/* Copyright 2007 Google Inc. All Rights Reserved. 917 +/* Copyright 2007 Google Inc. All Rights Reserved.
1024 +**/ 918 +**/
1025 + 919 +
1026 +#include <windows.h> 920 +#include <windows.h>
1027 +#include "unicode/udata.h" 921 +#include "unicode/udata.h"
1028 + 922 +
1029 +/* 923 +/*
1030 +** This function attempts to load the ICU data tables from a DLL. 924 +** This function attempts to load the ICU data tables from a DLL.
1031 +** Returns 0 on failure, nonzero on success. 925 +** Returns 0 on failure, nonzero on success.
(...skipping 15 matching lines...) Expand all
1047 + 941 +
1048 + addr = GetProcAddress(module, ICU_DATA_SYMBOL); 942 + addr = GetProcAddress(module, ICU_DATA_SYMBOL);
1049 + if (!addr) 943 + if (!addr)
1050 + return 0; 944 + return 0;
1051 + 945 +
1052 + err = U_ZERO_ERROR; 946 + err = U_ZERO_ERROR;
1053 + udata_setCommonData(addr, &err); 947 + udata_setCommonData(addr, &err);
1054 + 948 +
1055 + return 1; 949 + return 1;
1056 +} 950 +}
1057 Index: test/fts.test 951 diff --git a/third_party/sqlite/src/test/fts.test b/third_party/sqlite/src/test/ fts.test
1058 =================================================================== 952 new file mode 100644
1059 --- test/fts.test» 1969-12-31 16:00:00.000000000 -0800 953 index 0000000..031f547
1060 +++ test/fts.test» 2009-07-01 12:08:39.000000000 -0700 954 --- /dev/null
955 +++ b/third_party/sqlite/src/test/fts.test
1061 @@ -0,0 +1,61 @@ 956 @@ -0,0 +1,61 @@
1062 +# 957 +#
1063 +# May you do good and not evil. 958 +# May you do good and not evil.
1064 +# May you find forgiveness for yourself and forgive others. 959 +# May you find forgiveness for yourself and forgive others.
1065 +# May you share freely, never taking more than you give. 960 +# May you share freely, never taking more than you give.
1066 +# 961 +#
1067 +#*********************************************************************** 962 +#***********************************************************************
1068 +# This file runs the fts tests. 963 +# This file runs the fts tests.
1069 +# 964 +#
1070 +# $Id$ 965 +# $Id$
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 + if {$sqlite_open_file_count>0} { 1008 + if {$sqlite_open_file_count>0} {
1114 + puts "$tail did not close all files: $sqlite_open_file_count" 1009 + puts "$tail did not close all files: $sqlite_open_file_count"
1115 + incr nErr 1010 + incr nErr
1116 + lappend ::failList $tail 1011 + lappend ::failList $tail
1117 + } 1012 + }
1118 +} 1013 +}
1119 +source $testdir/misuse.test 1014 +source $testdir/misuse.test
1120 + 1015 +
1121 +set sqlite_open_file_count 0 1016 +set sqlite_open_file_count 0
1122 +really_finish_test 1017 +really_finish_test
1123 Index: test/fts1.test 1018 diff --git a/third_party/sqlite/src/test/fts1.test b/third_party/sqlite/src/test /fts1.test
1124 =================================================================== 1019 new file mode 100644
1125 --- test/fts1.test» 1969-12-31 16:00:00.000000000 -0800 1020 index 0000000..1ddb19f
1126 +++ test/fts1.test» 2009-07-01 12:08:39.000000000 -0700 1021 --- /dev/null
1022 +++ b/third_party/sqlite/src/test/fts1.test
1127 @@ -0,0 +1,61 @@ 1023 @@ -0,0 +1,61 @@
1128 +# 1024 +#
1129 +# May you do good and not evil. 1025 +# May you do good and not evil.
1130 +# May you find forgiveness for yourself and forgive others. 1026 +# May you find forgiveness for yourself and forgive others.
1131 +# May you share freely, never taking more than you give. 1027 +# May you share freely, never taking more than you give.
1132 +# 1028 +#
1133 +#*********************************************************************** 1029 +#***********************************************************************
1134 +# This file runs the fts tests. 1030 +# This file runs the fts tests.
1135 +# 1031 +#
1136 +# $Id$ 1032 +# $Id$
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 + if {$sqlite_open_file_count>0} { 1075 + if {$sqlite_open_file_count>0} {
1180 + puts "$tail did not close all files: $sqlite_open_file_count" 1076 + puts "$tail did not close all files: $sqlite_open_file_count"
1181 + incr nErr 1077 + incr nErr
1182 + lappend ::failList $tail 1078 + lappend ::failList $tail
1183 + } 1079 + }
1184 +} 1080 +}
1185 +source $testdir/misuse.test 1081 +source $testdir/misuse.test
1186 + 1082 +
1187 +set sqlite_open_file_count 0 1083 +set sqlite_open_file_count 0
1188 +really_finish_test 1084 +really_finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/icu-regexp.patch ('k') | third_party/sqlite/preload-cache.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698