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

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/src/test_config.c

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. 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 /* 1 /*
2 ** 2007 May 7 2 ** 2007 May 7
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
11 ************************************************************************* 11 *************************************************************************
12 ** 12 **
13 ** This file contains code used for testing the SQLite system. 13 ** This file contains code used for testing the SQLite system.
14 ** None of the code in this file goes into a deliverable build. 14 ** None of the code in this file goes into a deliverable build.
15 ** 15 **
16 ** The focus of this file is providing the TCL testing layer 16 ** The focus of this file is providing the TCL testing layer
17 ** access to compile-time constants. 17 ** access to compile-time constants.
18 */ 18 */
19 19
20 #include "sqliteLimit.h" 20 #include "sqliteLimit.h"
21 21
22 #include "sqliteInt.h" 22 #include "sqliteInt.h"
23 #if SQLITE_OS_WIN
24 # include "os_win.h"
25 #endif
26
23 #include "tcl.h" 27 #include "tcl.h"
24 #include <stdlib.h> 28 #include <stdlib.h>
25 #include <string.h> 29 #include <string.h>
26 30
27 /* 31 /*
28 ** Macro to stringify the results of the evaluation a pre-processor 32 ** Macro to stringify the results of the evaluation a pre-processor
29 ** macro. i.e. so that STRINGVALUE(SQLITE_NOMEM) -> "7". 33 ** macro. i.e. so that STRINGVALUE(SQLITE_NOMEM) -> "7".
30 */ 34 */
31 #define STRINGVALUE2(x) #x 35 #define STRINGVALUE2(x) #x
32 #define STRINGVALUE(x) STRINGVALUE2(x) 36 #define STRINGVALUE(x) STRINGVALUE2(x)
33 37
34 /* 38 /*
35 ** This routine sets entries in the global ::sqlite_options() array variable 39 ** This routine sets entries in the global ::sqlite_options() array variable
36 ** according to the compile-time configuration of the database. Test 40 ** according to the compile-time configuration of the database. Test
37 ** procedures use this to determine when tests should be omitted. 41 ** procedures use this to determine when tests should be omitted.
38 */ 42 */
39 static void set_options(Tcl_Interp *interp){ 43 static void set_options(Tcl_Interp *interp){
44 #ifdef HAVE_MALLOC_USABLE_SIZE
45 Tcl_SetVar2(interp, "sqlite_options", "malloc_usable_size", "1",
46 TCL_GLOBAL_ONLY);
47 #else
48 Tcl_SetVar2(interp, "sqlite_options", "malloc_usable_size", "0",
49 TCL_GLOBAL_ONLY);
50 #endif
51
40 #ifdef SQLITE_32BIT_ROWID 52 #ifdef SQLITE_32BIT_ROWID
41 Tcl_SetVar2(interp, "sqlite_options", "rowid32", "1", TCL_GLOBAL_ONLY); 53 Tcl_SetVar2(interp, "sqlite_options", "rowid32", "1", TCL_GLOBAL_ONLY);
42 #else 54 #else
43 Tcl_SetVar2(interp, "sqlite_options", "rowid32", "0", TCL_GLOBAL_ONLY); 55 Tcl_SetVar2(interp, "sqlite_options", "rowid32", "0", TCL_GLOBAL_ONLY);
44 #endif 56 #endif
45 57
46 #ifdef SQLITE_CASE_SENSITIVE_LIKE 58 #ifdef SQLITE_CASE_SENSITIVE_LIKE
47 Tcl_SetVar2(interp, "sqlite_options","casesensitivelike","1",TCL_GLOBAL_ONLY); 59 Tcl_SetVar2(interp, "sqlite_options","casesensitivelike","1",TCL_GLOBAL_ONLY);
48 #else 60 #else
49 Tcl_SetVar2(interp, "sqlite_options","casesensitivelike","0",TCL_GLOBAL_ONLY); 61 Tcl_SetVar2(interp, "sqlite_options","casesensitivelike","0",TCL_GLOBAL_ONLY);
50 #endif 62 #endif
51 63
64 #if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT
65 Tcl_SetVar2(interp, "sqlite_options", "curdir", "1", TCL_GLOBAL_ONLY);
66 #else
67 Tcl_SetVar2(interp, "sqlite_options", "curdir", "0", TCL_GLOBAL_ONLY);
68 #endif
69
70 #ifdef SQLITE_WIN32_MALLOC
71 Tcl_SetVar2(interp, "sqlite_options", "win32malloc", "1", TCL_GLOBAL_ONLY);
72 #else
73 Tcl_SetVar2(interp, "sqlite_options", "win32malloc", "0", TCL_GLOBAL_ONLY);
74 #endif
75
52 #ifdef SQLITE_DEBUG 76 #ifdef SQLITE_DEBUG
53 Tcl_SetVar2(interp, "sqlite_options", "debug", "1", TCL_GLOBAL_ONLY); 77 Tcl_SetVar2(interp, "sqlite_options", "debug", "1", TCL_GLOBAL_ONLY);
54 #else 78 #else
55 Tcl_SetVar2(interp, "sqlite_options", "debug", "0", TCL_GLOBAL_ONLY); 79 Tcl_SetVar2(interp, "sqlite_options", "debug", "0", TCL_GLOBAL_ONLY);
56 #endif 80 #endif
57 81
82 #ifdef SQLITE_DIRECT_OVERFLOW_READ
83 Tcl_SetVar2(interp, "sqlite_options", "direct_read", "1", TCL_GLOBAL_ONLY);
84 #else
85 Tcl_SetVar2(interp, "sqlite_options", "direct_read", "0", TCL_GLOBAL_ONLY);
86 #endif
87
58 #ifdef SQLITE_DISABLE_DIRSYNC 88 #ifdef SQLITE_DISABLE_DIRSYNC
59 Tcl_SetVar2(interp, "sqlite_options", "dirsync", "0", TCL_GLOBAL_ONLY); 89 Tcl_SetVar2(interp, "sqlite_options", "dirsync", "0", TCL_GLOBAL_ONLY);
60 #else 90 #else
61 Tcl_SetVar2(interp, "sqlite_options", "dirsync", "1", TCL_GLOBAL_ONLY); 91 Tcl_SetVar2(interp, "sqlite_options", "dirsync", "1", TCL_GLOBAL_ONLY);
62 #endif 92 #endif
63 93
64 #ifdef SQLITE_DISABLE_LFS 94 #ifdef SQLITE_DISABLE_LFS
65 Tcl_SetVar2(interp, "sqlite_options", "lfs", "0", TCL_GLOBAL_ONLY); 95 Tcl_SetVar2(interp, "sqlite_options", "lfs", "0", TCL_GLOBAL_ONLY);
66 #else 96 #else
67 Tcl_SetVar2(interp, "sqlite_options", "lfs", "1", TCL_GLOBAL_ONLY); 97 Tcl_SetVar2(interp, "sqlite_options", "lfs", "1", TCL_GLOBAL_ONLY);
68 #endif 98 #endif
69 99
100 #if SQLITE_MAX_MMAP_SIZE>0
101 Tcl_SetVar2(interp, "sqlite_options", "mmap", "1", TCL_GLOBAL_ONLY);
102 #else
103 Tcl_SetVar2(interp, "sqlite_options", "mmap", "0", TCL_GLOBAL_ONLY);
104 #endif
105
106 Tcl_SetVar2(interp, "sqlite_options", "worker_threads",
107 STRINGVALUE(SQLITE_MAX_WORKER_THREADS), TCL_GLOBAL_ONLY
108 );
109
70 #if 1 /* def SQLITE_MEMDEBUG */ 110 #if 1 /* def SQLITE_MEMDEBUG */
71 Tcl_SetVar2(interp, "sqlite_options", "memdebug", "1", TCL_GLOBAL_ONLY); 111 Tcl_SetVar2(interp, "sqlite_options", "memdebug", "1", TCL_GLOBAL_ONLY);
72 #else 112 #else
73 Tcl_SetVar2(interp, "sqlite_options", "memdebug", "0", TCL_GLOBAL_ONLY); 113 Tcl_SetVar2(interp, "sqlite_options", "memdebug", "0", TCL_GLOBAL_ONLY);
74 #endif 114 #endif
75 115
116 #ifdef SQLITE_ENABLE_8_3_NAMES
117 Tcl_SetVar2(interp, "sqlite_options", "8_3_names", "1", TCL_GLOBAL_ONLY);
118 #else
119 Tcl_SetVar2(interp, "sqlite_options", "8_3_names", "0", TCL_GLOBAL_ONLY);
120 #endif
121
76 #ifdef SQLITE_ENABLE_MEMSYS3 122 #ifdef SQLITE_ENABLE_MEMSYS3
77 Tcl_SetVar2(interp, "sqlite_options", "mem3", "1", TCL_GLOBAL_ONLY); 123 Tcl_SetVar2(interp, "sqlite_options", "mem3", "1", TCL_GLOBAL_ONLY);
78 #else 124 #else
79 Tcl_SetVar2(interp, "sqlite_options", "mem3", "0", TCL_GLOBAL_ONLY); 125 Tcl_SetVar2(interp, "sqlite_options", "mem3", "0", TCL_GLOBAL_ONLY);
80 #endif 126 #endif
81 127
82 #ifdef SQLITE_ENABLE_MEMSYS5 128 #ifdef SQLITE_ENABLE_MEMSYS5
83 Tcl_SetVar2(interp, "sqlite_options", "mem5", "1", TCL_GLOBAL_ONLY); 129 Tcl_SetVar2(interp, "sqlite_options", "mem5", "1", TCL_GLOBAL_ONLY);
84 #else 130 #else
85 Tcl_SetVar2(interp, "sqlite_options", "mem5", "0", TCL_GLOBAL_ONLY); 131 Tcl_SetVar2(interp, "sqlite_options", "mem5", "0", TCL_GLOBAL_ONLY);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 #else 226 #else
181 Tcl_SetVar2(interp, "sqlite_options", "cast", "1", TCL_GLOBAL_ONLY); 227 Tcl_SetVar2(interp, "sqlite_options", "cast", "1", TCL_GLOBAL_ONLY);
182 #endif 228 #endif
183 229
184 #ifdef SQLITE_OMIT_CHECK 230 #ifdef SQLITE_OMIT_CHECK
185 Tcl_SetVar2(interp, "sqlite_options", "check", "0", TCL_GLOBAL_ONLY); 231 Tcl_SetVar2(interp, "sqlite_options", "check", "0", TCL_GLOBAL_ONLY);
186 #else 232 #else
187 Tcl_SetVar2(interp, "sqlite_options", "check", "1", TCL_GLOBAL_ONLY); 233 Tcl_SetVar2(interp, "sqlite_options", "check", "1", TCL_GLOBAL_ONLY);
188 #endif 234 #endif
189 235
236 #ifdef SQLITE_OMIT_CTE
237 Tcl_SetVar2(interp, "sqlite_options", "cte", "0", TCL_GLOBAL_ONLY);
238 #else
239 Tcl_SetVar2(interp, "sqlite_options", "cte", "1", TCL_GLOBAL_ONLY);
240 #endif
241
190 #ifdef SQLITE_ENABLE_COLUMN_METADATA 242 #ifdef SQLITE_ENABLE_COLUMN_METADATA
191 Tcl_SetVar2(interp, "sqlite_options", "columnmetadata", "1", TCL_GLOBAL_ONLY); 243 Tcl_SetVar2(interp, "sqlite_options", "columnmetadata", "1", TCL_GLOBAL_ONLY);
192 #else 244 #else
193 Tcl_SetVar2(interp, "sqlite_options", "columnmetadata", "0", TCL_GLOBAL_ONLY); 245 Tcl_SetVar2(interp, "sqlite_options", "columnmetadata", "0", TCL_GLOBAL_ONLY);
194 #endif 246 #endif
195 247
196 #ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK 248 #ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK
197 Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "1", 249 Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "1",
198 TCL_GLOBAL_ONLY); 250 TCL_GLOBAL_ONLY);
199 #else 251 #else
(...skipping 12 matching lines...) Expand all
212 #else 264 #else
213 Tcl_SetVar2(interp, "sqlite_options", "complete", "1", TCL_GLOBAL_ONLY); 265 Tcl_SetVar2(interp, "sqlite_options", "complete", "1", TCL_GLOBAL_ONLY);
214 #endif 266 #endif
215 267
216 #ifdef SQLITE_OMIT_COMPOUND_SELECT 268 #ifdef SQLITE_OMIT_COMPOUND_SELECT
217 Tcl_SetVar2(interp, "sqlite_options", "compound", "0", TCL_GLOBAL_ONLY); 269 Tcl_SetVar2(interp, "sqlite_options", "compound", "0", TCL_GLOBAL_ONLY);
218 #else 270 #else
219 Tcl_SetVar2(interp, "sqlite_options", "compound", "1", TCL_GLOBAL_ONLY); 271 Tcl_SetVar2(interp, "sqlite_options", "compound", "1", TCL_GLOBAL_ONLY);
220 #endif 272 #endif
221 273
222 #ifdef SQLITE_OMIT_CONFLICT_CLAUSE
223 Tcl_SetVar2(interp, "sqlite_options", "conflict", "0", TCL_GLOBAL_ONLY);
224 #else
225 Tcl_SetVar2(interp, "sqlite_options", "conflict", "1", TCL_GLOBAL_ONLY); 274 Tcl_SetVar2(interp, "sqlite_options", "conflict", "1", TCL_GLOBAL_ONLY);
226 #endif
227
228 #if SQLITE_OS_UNIX
229 Tcl_SetVar2(interp, "sqlite_options", "crashtest", "1", TCL_GLOBAL_ONLY); 275 Tcl_SetVar2(interp, "sqlite_options", "crashtest", "1", TCL_GLOBAL_ONLY);
230 #else
231 Tcl_SetVar2(interp, "sqlite_options", "crashtest", "0", TCL_GLOBAL_ONLY);
232 #endif
233 276
234 #ifdef SQLITE_OMIT_DATETIME_FUNCS 277 #ifdef SQLITE_OMIT_DATETIME_FUNCS
235 Tcl_SetVar2(interp, "sqlite_options", "datetime", "0", TCL_GLOBAL_ONLY); 278 Tcl_SetVar2(interp, "sqlite_options", "datetime", "0", TCL_GLOBAL_ONLY);
236 #else 279 #else
237 Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY); 280 Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
238 #endif 281 #endif
239 282
240 #ifdef SQLITE_OMIT_DECLTYPE 283 #ifdef SQLITE_OMIT_DECLTYPE
241 Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY); 284 Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
242 #else 285 #else
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 #else 327 #else
285 Tcl_SetVar2(interp, "sqlite_options", "fts2", "0", TCL_GLOBAL_ONLY); 328 Tcl_SetVar2(interp, "sqlite_options", "fts2", "0", TCL_GLOBAL_ONLY);
286 #endif 329 #endif
287 330
288 #ifdef SQLITE_ENABLE_FTS3 331 #ifdef SQLITE_ENABLE_FTS3
289 Tcl_SetVar2(interp, "sqlite_options", "fts3", "1", TCL_GLOBAL_ONLY); 332 Tcl_SetVar2(interp, "sqlite_options", "fts3", "1", TCL_GLOBAL_ONLY);
290 #else 333 #else
291 Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY); 334 Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY);
292 #endif 335 #endif
293 336
337 #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_DISABLE_FTS3_UNICODE)
338 Tcl_SetVar2(interp, "sqlite_options", "fts3_unicode", "1", TCL_GLOBAL_ONLY);
339 #else
340 Tcl_SetVar2(interp, "sqlite_options", "fts3_unicode", "0", TCL_GLOBAL_ONLY);
341 #endif
342
343 #ifdef SQLITE_DISABLE_FTS4_DEFERRED
344 Tcl_SetVar2(interp, "sqlite_options", "fts4_deferred", "0", TCL_GLOBAL_ONLY);
345 #else
346 Tcl_SetVar2(interp, "sqlite_options", "fts4_deferred", "1", TCL_GLOBAL_ONLY);
347 #endif
348
294 #ifdef SQLITE_OMIT_GET_TABLE 349 #ifdef SQLITE_OMIT_GET_TABLE
295 Tcl_SetVar2(interp, "sqlite_options", "gettable", "0", TCL_GLOBAL_ONLY); 350 Tcl_SetVar2(interp, "sqlite_options", "gettable", "0", TCL_GLOBAL_ONLY);
296 #else 351 #else
297 Tcl_SetVar2(interp, "sqlite_options", "gettable", "1", TCL_GLOBAL_ONLY); 352 Tcl_SetVar2(interp, "sqlite_options", "gettable", "1", TCL_GLOBAL_ONLY);
298 #endif 353 #endif
299 354
300 #ifdef SQLITE_ENABLE_ICU 355 #ifdef SQLITE_ENABLE_ICU
301 Tcl_SetVar2(interp, "sqlite_options", "icu", "1", TCL_GLOBAL_ONLY); 356 Tcl_SetVar2(interp, "sqlite_options", "icu", "1", TCL_GLOBAL_ONLY);
302 #else 357 #else
303 Tcl_SetVar2(interp, "sqlite_options", "icu", "0", TCL_GLOBAL_ONLY); 358 Tcl_SetVar2(interp, "sqlite_options", "icu", "0", TCL_GLOBAL_ONLY);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 #else 409 #else
355 Tcl_SetVar2(interp, "sqlite_options", "memorydb", "1", TCL_GLOBAL_ONLY); 410 Tcl_SetVar2(interp, "sqlite_options", "memorydb", "1", TCL_GLOBAL_ONLY);
356 #endif 411 #endif
357 412
358 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT 413 #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
359 Tcl_SetVar2(interp, "sqlite_options", "memorymanage", "1", TCL_GLOBAL_ONLY); 414 Tcl_SetVar2(interp, "sqlite_options", "memorymanage", "1", TCL_GLOBAL_ONLY);
360 #else 415 #else
361 Tcl_SetVar2(interp, "sqlite_options", "memorymanage", "0", TCL_GLOBAL_ONLY); 416 Tcl_SetVar2(interp, "sqlite_options", "memorymanage", "0", TCL_GLOBAL_ONLY);
362 #endif 417 #endif
363 418
419 Tcl_SetVar2(interp, "sqlite_options", "mergesort", "1", TCL_GLOBAL_ONLY);
420
364 #ifdef SQLITE_OMIT_OR_OPTIMIZATION 421 #ifdef SQLITE_OMIT_OR_OPTIMIZATION
365 Tcl_SetVar2(interp, "sqlite_options", "or_opt", "0", TCL_GLOBAL_ONLY); 422 Tcl_SetVar2(interp, "sqlite_options", "or_opt", "0", TCL_GLOBAL_ONLY);
366 #else 423 #else
367 Tcl_SetVar2(interp, "sqlite_options", "or_opt", "1", TCL_GLOBAL_ONLY); 424 Tcl_SetVar2(interp, "sqlite_options", "or_opt", "1", TCL_GLOBAL_ONLY);
368 #endif 425 #endif
369 426
370 #ifdef SQLITE_OMIT_PAGER_PRAGMAS 427 #ifdef SQLITE_OMIT_PAGER_PRAGMAS
371 Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "0", TCL_GLOBAL_ONLY); 428 Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "0", TCL_GLOBAL_ONLY);
372 #else 429 #else
373 Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "1", TCL_GLOBAL_ONLY); 430 Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "1", TCL_GLOBAL_ONLY);
(...skipping 17 matching lines...) Expand all
391 #else 448 #else
392 Tcl_SetVar2(interp, "sqlite_options", "reindex", "1", TCL_GLOBAL_ONLY); 449 Tcl_SetVar2(interp, "sqlite_options", "reindex", "1", TCL_GLOBAL_ONLY);
393 #endif 450 #endif
394 451
395 #ifdef SQLITE_ENABLE_RTREE 452 #ifdef SQLITE_ENABLE_RTREE
396 Tcl_SetVar2(interp, "sqlite_options", "rtree", "1", TCL_GLOBAL_ONLY); 453 Tcl_SetVar2(interp, "sqlite_options", "rtree", "1", TCL_GLOBAL_ONLY);
397 #else 454 #else
398 Tcl_SetVar2(interp, "sqlite_options", "rtree", "0", TCL_GLOBAL_ONLY); 455 Tcl_SetVar2(interp, "sqlite_options", "rtree", "0", TCL_GLOBAL_ONLY);
399 #endif 456 #endif
400 457
458 #ifdef SQLITE_RTREE_INT_ONLY
459 Tcl_SetVar2(interp, "sqlite_options", "rtree_int_only", "1", TCL_GLOBAL_ONLY);
460 #else
461 Tcl_SetVar2(interp, "sqlite_options", "rtree_int_only", "0", TCL_GLOBAL_ONLY);
462 #endif
463
401 #ifdef SQLITE_OMIT_SCHEMA_PRAGMAS 464 #ifdef SQLITE_OMIT_SCHEMA_PRAGMAS
402 Tcl_SetVar2(interp, "sqlite_options", "schema_pragmas", "0", TCL_GLOBAL_ONLY); 465 Tcl_SetVar2(interp, "sqlite_options", "schema_pragmas", "0", TCL_GLOBAL_ONLY);
403 #else 466 #else
404 Tcl_SetVar2(interp, "sqlite_options", "schema_pragmas", "1", TCL_GLOBAL_ONLY); 467 Tcl_SetVar2(interp, "sqlite_options", "schema_pragmas", "1", TCL_GLOBAL_ONLY);
405 #endif 468 #endif
406 469
407 #ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS 470 #ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
408 Tcl_SetVar2(interp, "sqlite_options", "schema_version", "0", TCL_GLOBAL_ONLY); 471 Tcl_SetVar2(interp, "sqlite_options", "schema_version", "0", TCL_GLOBAL_ONLY);
409 #else 472 #else
410 Tcl_SetVar2(interp, "sqlite_options", "schema_version", "1", TCL_GLOBAL_ONLY); 473 Tcl_SetVar2(interp, "sqlite_options", "schema_version", "1", TCL_GLOBAL_ONLY);
411 #endif 474 #endif
412 475
413 #ifdef SQLITE_ENABLE_STAT2 476 #ifdef SQLITE_ENABLE_STAT4
414 Tcl_SetVar2(interp, "sqlite_options", "stat2", "1", TCL_GLOBAL_ONLY); 477 Tcl_SetVar2(interp, "sqlite_options", "stat4", "1", TCL_GLOBAL_ONLY);
415 #else 478 #else
416 Tcl_SetVar2(interp, "sqlite_options", "stat2", "0", TCL_GLOBAL_ONLY); 479 Tcl_SetVar2(interp, "sqlite_options", "stat4", "0", TCL_GLOBAL_ONLY);
480 #endif
481 #if defined(SQLITE_ENABLE_STAT3) && !defined(SQLITE_ENABLE_STAT4)
482 Tcl_SetVar2(interp, "sqlite_options", "stat3", "1", TCL_GLOBAL_ONLY);
483 #else
484 Tcl_SetVar2(interp, "sqlite_options", "stat3", "0", TCL_GLOBAL_ONLY);
417 #endif 485 #endif
418 486
419 #if !defined(SQLITE_ENABLE_LOCKING_STYLE) 487 #if !defined(SQLITE_ENABLE_LOCKING_STYLE)
420 # if defined(__APPLE__) 488 # if defined(__APPLE__)
421 # define SQLITE_ENABLE_LOCKING_STYLE 1 489 # define SQLITE_ENABLE_LOCKING_STYLE 1
422 # else 490 # else
423 # define SQLITE_ENABLE_LOCKING_STYLE 0 491 # define SQLITE_ENABLE_LOCKING_STYLE 0
424 # endif 492 # endif
425 #endif 493 #endif
426 #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) 494 #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 #else 596 #else
529 Tcl_SetVar2(interp, "sqlite_options", "unlock_notify", "0", TCL_GLOBAL_ONLY); 597 Tcl_SetVar2(interp, "sqlite_options", "unlock_notify", "0", TCL_GLOBAL_ONLY);
530 #endif 598 #endif
531 599
532 #ifdef SQLITE_SECURE_DELETE 600 #ifdef SQLITE_SECURE_DELETE
533 Tcl_SetVar2(interp, "sqlite_options", "secure_delete", "1", TCL_GLOBAL_ONLY); 601 Tcl_SetVar2(interp, "sqlite_options", "secure_delete", "1", TCL_GLOBAL_ONLY);
534 #else 602 #else
535 Tcl_SetVar2(interp, "sqlite_options", "secure_delete", "0", TCL_GLOBAL_ONLY); 603 Tcl_SetVar2(interp, "sqlite_options", "secure_delete", "0", TCL_GLOBAL_ONLY);
536 #endif 604 #endif
537 605
606 #ifdef SQLITE_USER_AUTHENTICATION
607 Tcl_SetVar2(interp, "sqlite_options", "userauth", "1", TCL_GLOBAL_ONLY);
608 #else
609 Tcl_SetVar2(interp, "sqlite_options", "userauth", "0", TCL_GLOBAL_ONLY);
610 #endif
611
538 #ifdef SQLITE_MULTIPLEX_EXT_OVWR 612 #ifdef SQLITE_MULTIPLEX_EXT_OVWR
539 Tcl_SetVar2(interp, "sqlite_options", "multiplex_ext_overwrite", "1", TCL_GLOB AL_ONLY); 613 Tcl_SetVar2(interp, "sqlite_options", "multiplex_ext_overwrite", "1", TCL_GLOB AL_ONLY);
540 #else 614 #else
541 Tcl_SetVar2(interp, "sqlite_options", "multiplex_ext_overwrite", "0", TCL_GLOB AL_ONLY); 615 Tcl_SetVar2(interp, "sqlite_options", "multiplex_ext_overwrite", "0", TCL_GLOB AL_ONLY);
542 #endif 616 #endif
543 617
544 #ifdef YYTRACKMAXSTACKDEPTH 618 #ifdef YYTRACKMAXSTACKDEPTH
545 Tcl_SetVar2(interp, "sqlite_options", "yytrackmaxstackdepth", "1", TCL_GLOBAL_ ONLY); 619 Tcl_SetVar2(interp, "sqlite_options", "yytrackmaxstackdepth", "1", TCL_GLOBAL_ ONLY);
546 #else 620 #else
547 Tcl_SetVar2(interp, "sqlite_options", "yytrackmaxstackdepth", "0", TCL_GLOBAL_ ONLY); 621 Tcl_SetVar2(interp, "sqlite_options", "yytrackmaxstackdepth", "0", TCL_GLOBAL_ ONLY);
(...skipping 14 matching lines...) Expand all
562 LINKVAR( MAX_VARIABLE_NUMBER ); 636 LINKVAR( MAX_VARIABLE_NUMBER );
563 LINKVAR( MAX_PAGE_SIZE ); 637 LINKVAR( MAX_PAGE_SIZE );
564 LINKVAR( MAX_PAGE_COUNT ); 638 LINKVAR( MAX_PAGE_COUNT );
565 LINKVAR( MAX_LIKE_PATTERN_LENGTH ); 639 LINKVAR( MAX_LIKE_PATTERN_LENGTH );
566 LINKVAR( MAX_TRIGGER_DEPTH ); 640 LINKVAR( MAX_TRIGGER_DEPTH );
567 LINKVAR( DEFAULT_TEMP_CACHE_SIZE ); 641 LINKVAR( DEFAULT_TEMP_CACHE_SIZE );
568 LINKVAR( DEFAULT_CACHE_SIZE ); 642 LINKVAR( DEFAULT_CACHE_SIZE );
569 LINKVAR( DEFAULT_PAGE_SIZE ); 643 LINKVAR( DEFAULT_PAGE_SIZE );
570 LINKVAR( DEFAULT_FILE_FORMAT ); 644 LINKVAR( DEFAULT_FILE_FORMAT );
571 LINKVAR( MAX_ATTACHED ); 645 LINKVAR( MAX_ATTACHED );
646 LINKVAR( MAX_DEFAULT_PAGE_SIZE );
647 LINKVAR( MAX_WORKER_THREADS );
572 648
573 { 649 {
574 static const int cv_TEMP_STORE = SQLITE_TEMP_STORE; 650 static const int cv_TEMP_STORE = SQLITE_TEMP_STORE;
575 Tcl_LinkVar(interp, "TEMP_STORE", (char *)&(cv_TEMP_STORE), 651 Tcl_LinkVar(interp, "TEMP_STORE", (char *)&(cv_TEMP_STORE),
576 TCL_LINK_INT | TCL_LINK_READ_ONLY); 652 TCL_LINK_INT | TCL_LINK_READ_ONLY);
577 } 653 }
654
655 #ifdef _MSC_VER
656 {
657 static const int cv__MSC_VER = 1;
658 Tcl_LinkVar(interp, "_MSC_VER", (char *)&(cv__MSC_VER),
659 TCL_LINK_INT | TCL_LINK_READ_ONLY);
660 }
661 #endif
662 #ifdef __GNUC__
663 {
664 static const int cv___GNUC__ = 1;
665 Tcl_LinkVar(interp, "__GNUC__", (char *)&(cv___GNUC__),
666 TCL_LINK_INT | TCL_LINK_READ_ONLY);
667 }
668 #endif
578 } 669 }
579 670
580 671
581 /* 672 /*
582 ** Register commands with the TCL interpreter. 673 ** Register commands with the TCL interpreter.
583 */ 674 */
584 int Sqliteconfig_Init(Tcl_Interp *interp){ 675 int Sqliteconfig_Init(Tcl_Interp *interp){
585 set_options(interp); 676 set_options(interp);
586 return TCL_OK; 677 return TCL_OK;
587 } 678 }
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/src/test_btree.c ('k') | third_party/sqlite/sqlite-src-3080704/src/test_demovfs.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698