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

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

Issue 5626002: Update sqlite to 3.7.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/third_party/sqlite/src
Patch Set: Update version in doc. 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
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 **
19 ** $Id: test_config.c,v 1.50 2009/06/19 14:06:03 drh Exp $
20 */ 18 */
21 19
22 #include "sqliteLimit.h" 20 #include "sqliteLimit.h"
23 21
24 #include "sqliteInt.h" 22 #include "sqliteInt.h"
25 #include "tcl.h" 23 #include "tcl.h"
26 #include <stdlib.h> 24 #include <stdlib.h>
27 #include <string.h> 25 #include <string.h>
28 26
29 /* 27 /*
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 #else 120 #else
123 Tcl_SetVar2(interp, "sqlite_options", "auth", "1", TCL_GLOBAL_ONLY); 121 Tcl_SetVar2(interp, "sqlite_options", "auth", "1", TCL_GLOBAL_ONLY);
124 #endif 122 #endif
125 123
126 #ifdef SQLITE_OMIT_AUTOINCREMENT 124 #ifdef SQLITE_OMIT_AUTOINCREMENT
127 Tcl_SetVar2(interp, "sqlite_options", "autoinc", "0", TCL_GLOBAL_ONLY); 125 Tcl_SetVar2(interp, "sqlite_options", "autoinc", "0", TCL_GLOBAL_ONLY);
128 #else 126 #else
129 Tcl_SetVar2(interp, "sqlite_options", "autoinc", "1", TCL_GLOBAL_ONLY); 127 Tcl_SetVar2(interp, "sqlite_options", "autoinc", "1", TCL_GLOBAL_ONLY);
130 #endif 128 #endif
131 129
130 #ifdef SQLITE_OMIT_AUTOMATIC_INDEX
131 Tcl_SetVar2(interp, "sqlite_options", "autoindex", "0", TCL_GLOBAL_ONLY);
132 #else
133 Tcl_SetVar2(interp, "sqlite_options", "autoindex", "1", TCL_GLOBAL_ONLY);
134 #endif
135
132 #ifdef SQLITE_OMIT_AUTOVACUUM 136 #ifdef SQLITE_OMIT_AUTOVACUUM
133 Tcl_SetVar2(interp, "sqlite_options", "autovacuum", "0", TCL_GLOBAL_ONLY); 137 Tcl_SetVar2(interp, "sqlite_options", "autovacuum", "0", TCL_GLOBAL_ONLY);
134 #else 138 #else
135 Tcl_SetVar2(interp, "sqlite_options", "autovacuum", "1", TCL_GLOBAL_ONLY); 139 Tcl_SetVar2(interp, "sqlite_options", "autovacuum", "1", TCL_GLOBAL_ONLY);
136 #endif /* SQLITE_OMIT_AUTOVACUUM */ 140 #endif /* SQLITE_OMIT_AUTOVACUUM */
137 #if !defined(SQLITE_DEFAULT_AUTOVACUUM) 141 #if !defined(SQLITE_DEFAULT_AUTOVACUUM)
138 Tcl_SetVar2(interp,"sqlite_options","default_autovacuum","0",TCL_GLOBAL_ONLY); 142 Tcl_SetVar2(interp,"sqlite_options","default_autovacuum","0",TCL_GLOBAL_ONLY);
139 #else 143 #else
140 Tcl_SetVar2(interp, "sqlite_options", "default_autovacuum", 144 Tcl_SetVar2(interp, "sqlite_options", "default_autovacuum",
141 STRINGVALUE(SQLITE_DEFAULT_AUTOVACUUM), TCL_GLOBAL_ONLY); 145 STRINGVALUE(SQLITE_DEFAULT_AUTOVACUUM), TCL_GLOBAL_ONLY);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 #endif 182 #endif
179 183
180 #ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK 184 #ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK
181 Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "1", 185 Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "1",
182 TCL_GLOBAL_ONLY); 186 TCL_GLOBAL_ONLY);
183 #else 187 #else
184 Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "0", 188 Tcl_SetVar2(interp, "sqlite_options", "oversize_cell_check", "0",
185 TCL_GLOBAL_ONLY); 189 TCL_GLOBAL_ONLY);
186 #endif 190 #endif
187 191
188 192 #ifdef SQLITE_OMIT_COMPILEOPTION_DIAGS
193 Tcl_SetVar2(interp, "sqlite_options", "compileoption_diags", "0", TCL_GLOBAL_O NLY);
194 #else
195 Tcl_SetVar2(interp, "sqlite_options", "compileoption_diags", "1", TCL_GLOBAL_O NLY);
196 #endif
189 197
190 #ifdef SQLITE_OMIT_COMPLETE 198 #ifdef SQLITE_OMIT_COMPLETE
191 Tcl_SetVar2(interp, "sqlite_options", "complete", "0", TCL_GLOBAL_ONLY); 199 Tcl_SetVar2(interp, "sqlite_options", "complete", "0", TCL_GLOBAL_ONLY);
192 #else 200 #else
193 Tcl_SetVar2(interp, "sqlite_options", "complete", "1", TCL_GLOBAL_ONLY); 201 Tcl_SetVar2(interp, "sqlite_options", "complete", "1", TCL_GLOBAL_ONLY);
194 #endif 202 #endif
195 203
196 #ifdef SQLITE_OMIT_COMPOUND_SELECT 204 #ifdef SQLITE_OMIT_COMPOUND_SELECT
197 Tcl_SetVar2(interp, "sqlite_options", "compound", "0", TCL_GLOBAL_ONLY); 205 Tcl_SetVar2(interp, "sqlite_options", "compound", "0", TCL_GLOBAL_ONLY);
198 #else 206 #else
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 #else 278 #else
271 Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY); 279 Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY);
272 #endif 280 #endif
273 281
274 #ifdef SQLITE_OMIT_GET_TABLE 282 #ifdef SQLITE_OMIT_GET_TABLE
275 Tcl_SetVar2(interp, "sqlite_options", "gettable", "0", TCL_GLOBAL_ONLY); 283 Tcl_SetVar2(interp, "sqlite_options", "gettable", "0", TCL_GLOBAL_ONLY);
276 #else 284 #else
277 Tcl_SetVar2(interp, "sqlite_options", "gettable", "1", TCL_GLOBAL_ONLY); 285 Tcl_SetVar2(interp, "sqlite_options", "gettable", "1", TCL_GLOBAL_ONLY);
278 #endif 286 #endif
279 287
280 #ifdef SQLITE_OMIT_GLOBALRECOVER
281 Tcl_SetVar2(interp, "sqlite_options", "globalrecover", "0", TCL_GLOBAL_ONLY);
282 #else
283 Tcl_SetVar2(interp, "sqlite_options", "globalrecover", "1", TCL_GLOBAL_ONLY);
284 #endif
285
286 #ifdef SQLITE_ENABLE_ICU 288 #ifdef SQLITE_ENABLE_ICU
287 Tcl_SetVar2(interp, "sqlite_options", "icu", "1", TCL_GLOBAL_ONLY); 289 Tcl_SetVar2(interp, "sqlite_options", "icu", "1", TCL_GLOBAL_ONLY);
288 #else 290 #else
289 Tcl_SetVar2(interp, "sqlite_options", "icu", "0", TCL_GLOBAL_ONLY); 291 Tcl_SetVar2(interp, "sqlite_options", "icu", "0", TCL_GLOBAL_ONLY);
290 #endif 292 #endif
291 293
292 #ifdef SQLITE_OMIT_INCRBLOB 294 #ifdef SQLITE_OMIT_INCRBLOB
293 Tcl_SetVar2(interp, "sqlite_options", "incrblob", "0", TCL_GLOBAL_ONLY); 295 Tcl_SetVar2(interp, "sqlite_options", "incrblob", "0", TCL_GLOBAL_ONLY);
294 #else 296 #else
295 Tcl_SetVar2(interp, "sqlite_options", "incrblob", "1", TCL_GLOBAL_ONLY); 297 Tcl_SetVar2(interp, "sqlite_options", "incrblob", "1", TCL_GLOBAL_ONLY);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 #else 456 #else
455 Tcl_SetVar2(interp, "sqlite_options", "trace", "1", TCL_GLOBAL_ONLY); 457 Tcl_SetVar2(interp, "sqlite_options", "trace", "1", TCL_GLOBAL_ONLY);
456 #endif 458 #endif
457 459
458 #ifdef SQLITE_OMIT_TRIGGER 460 #ifdef SQLITE_OMIT_TRIGGER
459 Tcl_SetVar2(interp, "sqlite_options", "trigger", "0", TCL_GLOBAL_ONLY); 461 Tcl_SetVar2(interp, "sqlite_options", "trigger", "0", TCL_GLOBAL_ONLY);
460 #else 462 #else
461 Tcl_SetVar2(interp, "sqlite_options", "trigger", "1", TCL_GLOBAL_ONLY); 463 Tcl_SetVar2(interp, "sqlite_options", "trigger", "1", TCL_GLOBAL_ONLY);
462 #endif 464 #endif
463 465
464 #ifdef SQLITE_OMIT_TRUCATE_OPTIMIZATION 466 #ifdef SQLITE_OMIT_TRUNCATE_OPTIMIZATION
465 Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "0", TCL_GLOBAL_ONLY); 467 Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "0", TCL_GLOBAL_ONLY);
466 #else 468 #else
467 Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY); 469 Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
468 #endif 470 #endif
469 471
470 #ifdef SQLITE_OMIT_UTF16 472 #ifdef SQLITE_OMIT_UTF16
471 Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY); 473 Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
472 #else 474 #else
473 Tcl_SetVar2(interp, "sqlite_options", "utf16", "1", TCL_GLOBAL_ONLY); 475 Tcl_SetVar2(interp, "sqlite_options", "utf16", "1", TCL_GLOBAL_ONLY);
474 #endif 476 #endif
475 477
476 #if defined(SQLITE_OMIT_VACUUM) || defined(SQLITE_OMIT_ATTACH) 478 #if defined(SQLITE_OMIT_VACUUM) || defined(SQLITE_OMIT_ATTACH)
477 Tcl_SetVar2(interp, "sqlite_options", "vacuum", "0", TCL_GLOBAL_ONLY); 479 Tcl_SetVar2(interp, "sqlite_options", "vacuum", "0", TCL_GLOBAL_ONLY);
478 #else 480 #else
479 Tcl_SetVar2(interp, "sqlite_options", "vacuum", "1", TCL_GLOBAL_ONLY); 481 Tcl_SetVar2(interp, "sqlite_options", "vacuum", "1", TCL_GLOBAL_ONLY);
480 #endif 482 #endif
481 483
482 #ifdef SQLITE_OMIT_VIEW 484 #ifdef SQLITE_OMIT_VIEW
483 Tcl_SetVar2(interp, "sqlite_options", "view", "0", TCL_GLOBAL_ONLY); 485 Tcl_SetVar2(interp, "sqlite_options", "view", "0", TCL_GLOBAL_ONLY);
484 #else 486 #else
485 Tcl_SetVar2(interp, "sqlite_options", "view", "1", TCL_GLOBAL_ONLY); 487 Tcl_SetVar2(interp, "sqlite_options", "view", "1", TCL_GLOBAL_ONLY);
486 #endif 488 #endif
487 489
488 #ifdef SQLITE_OMIT_VIRTUALTABLE 490 #ifdef SQLITE_OMIT_VIRTUALTABLE
489 Tcl_SetVar2(interp, "sqlite_options", "vtab", "0", TCL_GLOBAL_ONLY); 491 Tcl_SetVar2(interp, "sqlite_options", "vtab", "0", TCL_GLOBAL_ONLY);
490 #else 492 #else
491 Tcl_SetVar2(interp, "sqlite_options", "vtab", "1", TCL_GLOBAL_ONLY); 493 Tcl_SetVar2(interp, "sqlite_options", "vtab", "1", TCL_GLOBAL_ONLY);
492 #endif 494 #endif
493 495
496 #ifdef SQLITE_OMIT_WAL
497 Tcl_SetVar2(interp, "sqlite_options", "wal", "0", TCL_GLOBAL_ONLY);
498 #else
499 Tcl_SetVar2(interp, "sqlite_options", "wal", "1", TCL_GLOBAL_ONLY);
500 #endif
501
494 #ifdef SQLITE_OMIT_WSD 502 #ifdef SQLITE_OMIT_WSD
495 Tcl_SetVar2(interp, "sqlite_options", "wsd", "0", TCL_GLOBAL_ONLY); 503 Tcl_SetVar2(interp, "sqlite_options", "wsd", "0", TCL_GLOBAL_ONLY);
496 #else 504 #else
497 Tcl_SetVar2(interp, "sqlite_options", "wsd", "1", TCL_GLOBAL_ONLY); 505 Tcl_SetVar2(interp, "sqlite_options", "wsd", "1", TCL_GLOBAL_ONLY);
498 #endif 506 #endif
499 507
500 #if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) 508 #if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
501 Tcl_SetVar2(interp, "sqlite_options", "update_delete_limit", "1", TCL_GLOBAL_O NLY); 509 Tcl_SetVar2(interp, "sqlite_options", "update_delete_limit", "1", TCL_GLOBAL_O NLY);
502 #else 510 #else
503 Tcl_SetVar2(interp, "sqlite_options", "update_delete_limit", "0", TCL_GLOBAL_O NLY); 511 Tcl_SetVar2(interp, "sqlite_options", "update_delete_limit", "0", TCL_GLOBAL_O NLY);
(...skipping 26 matching lines...) Expand all
530 LINKVAR( MAX_COLUMN ); 538 LINKVAR( MAX_COLUMN );
531 LINKVAR( MAX_SQL_LENGTH ); 539 LINKVAR( MAX_SQL_LENGTH );
532 LINKVAR( MAX_EXPR_DEPTH ); 540 LINKVAR( MAX_EXPR_DEPTH );
533 LINKVAR( MAX_COMPOUND_SELECT ); 541 LINKVAR( MAX_COMPOUND_SELECT );
534 LINKVAR( MAX_VDBE_OP ); 542 LINKVAR( MAX_VDBE_OP );
535 LINKVAR( MAX_FUNCTION_ARG ); 543 LINKVAR( MAX_FUNCTION_ARG );
536 LINKVAR( MAX_VARIABLE_NUMBER ); 544 LINKVAR( MAX_VARIABLE_NUMBER );
537 LINKVAR( MAX_PAGE_SIZE ); 545 LINKVAR( MAX_PAGE_SIZE );
538 LINKVAR( MAX_PAGE_COUNT ); 546 LINKVAR( MAX_PAGE_COUNT );
539 LINKVAR( MAX_LIKE_PATTERN_LENGTH ); 547 LINKVAR( MAX_LIKE_PATTERN_LENGTH );
548 LINKVAR( MAX_TRIGGER_DEPTH );
540 LINKVAR( DEFAULT_TEMP_CACHE_SIZE ); 549 LINKVAR( DEFAULT_TEMP_CACHE_SIZE );
541 LINKVAR( DEFAULT_CACHE_SIZE ); 550 LINKVAR( DEFAULT_CACHE_SIZE );
542 LINKVAR( DEFAULT_PAGE_SIZE ); 551 LINKVAR( DEFAULT_PAGE_SIZE );
543 LINKVAR( DEFAULT_FILE_FORMAT ); 552 LINKVAR( DEFAULT_FILE_FORMAT );
544 LINKVAR( MAX_ATTACHED ); 553 LINKVAR( MAX_ATTACHED );
545 554
546 { 555 {
547 static const int cv_TEMP_STORE = SQLITE_TEMP_STORE; 556 static const int cv_TEMP_STORE = SQLITE_TEMP_STORE;
548 Tcl_LinkVar(interp, "TEMP_STORE", (char *)&(cv_TEMP_STORE), 557 Tcl_LinkVar(interp, "TEMP_STORE", (char *)&(cv_TEMP_STORE),
549 TCL_LINK_INT | TCL_LINK_READ_ONLY); 558 TCL_LINK_INT | TCL_LINK_READ_ONLY);
550 } 559 }
551 } 560 }
552 561
553 562
554 /* 563 /*
555 ** Register commands with the TCL interpreter. 564 ** Register commands with the TCL interpreter.
556 */ 565 */
557 int Sqliteconfig_Init(Tcl_Interp *interp){ 566 int Sqliteconfig_Init(Tcl_Interp *interp){
558 set_options(interp); 567 set_options(interp);
559 return TCL_OK; 568 return TCL_OK;
560 } 569 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698