Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Allow sqllimits1.test to be run from a regular build of testfixture. Add the 'amalgamation-testfixture' target to main.mk - to build testfixture via sqlite3.c. (CVS 4354) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d119427314d27f291b605073d34826cd |
User & Date: | danielk1977 2007-08-31 17:42:48.000 |
Context
2007-08-31
| ||
18:34 | Remove the xLockState method for sqlite3_io_methods. Replace it with a defined call to xFileControl(). This simplifies the interface and also gives us coverage testing of sqlite3_file_control(). (CVS 4355) (check-in: 306586c412 user: drh tags: trunk) | |
17:42 | Allow sqllimits1.test to be run from a regular build of testfixture. Add the 'amalgamation-testfixture' target to main.mk - to build testfixture via sqlite3.c. (CVS 4354) (check-in: d119427314 user: danielk1977 tags: trunk) | |
16:11 | Initial implementation of the sqlite3_file_control() interface. Compiles and passes all historical tests but the new method is itself untested. (CVS 4353) (check-in: d3ab3e3911 user: drh tags: trunk) | |
Changes
Changes to main.mk.
︙ | ︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | $(TOP)/src/alter.c \ $(TOP)/src/analyze.c \ $(TOP)/src/attach.c \ $(TOP)/src/auth.c \ $(TOP)/src/btmutex.c \ $(TOP)/src/btree.c \ $(TOP)/src/btree.h \ $(TOP)/src/build.c \ $(TOP)/src/callback.c \ $(TOP)/src/complete.c \ $(TOP)/src/date.c \ $(TOP)/src/delete.c \ $(TOP)/src/expr.c \ $(TOP)/src/func.c \ $(TOP)/src/hash.c \ $(TOP)/src/hash.h \ $(TOP)/src/insert.c \ $(TOP)/src/journal.c \ $(TOP)/src/legacy.c \ $(TOP)/src/loadext.c \ $(TOP)/src/main.c \ $(TOP)/src/malloc.c \ $(TOP)/src/mem1.c \ $(TOP)/src/mem2.c \ $(TOP)/src/mutex.c \ $(TOP)/src/mutex_os2.c \ $(TOP)/src/mutex_unix.c \ $(TOP)/src/mutex_w32.c \ $(TOP)/src/os.c \ $(TOP)/src/os_os2.c \ $(TOP)/src/os_unix.c \ $(TOP)/src/os_win.c \ $(TOP)/src/pager.c \ $(TOP)/src/pager.h \ $(TOP)/src/parse.y \ $(TOP)/src/pragma.c \ $(TOP)/src/prepare.c \ $(TOP)/src/printf.c \ $(TOP)/src/random.c \ $(TOP)/src/select.c \ $(TOP)/src/shell.c \ $(TOP)/src/sqlite.h.in \ $(TOP)/src/sqlite3ext.h \ $(TOP)/src/sqliteInt.h \ $(TOP)/src/table.c \ $(TOP)/src/tclsqlite.c \ $(TOP)/src/tokenize.c \ $(TOP)/src/trigger.c \ $(TOP)/src/utf.c \ $(TOP)/src/update.c \ $(TOP)/src/util.c \ | > > > > > | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | $(TOP)/src/alter.c \ $(TOP)/src/analyze.c \ $(TOP)/src/attach.c \ $(TOP)/src/auth.c \ $(TOP)/src/btmutex.c \ $(TOP)/src/btree.c \ $(TOP)/src/btree.h \ $(TOP)/src/btreeInt.h \ $(TOP)/src/build.c \ $(TOP)/src/callback.c \ $(TOP)/src/complete.c \ $(TOP)/src/date.c \ $(TOP)/src/delete.c \ $(TOP)/src/expr.c \ $(TOP)/src/func.c \ $(TOP)/src/hash.c \ $(TOP)/src/hash.h \ $(TOP)/src/insert.c \ $(TOP)/src/journal.c \ $(TOP)/src/legacy.c \ $(TOP)/src/loadext.c \ $(TOP)/src/main.c \ $(TOP)/src/malloc.c \ $(TOP)/src/mem1.c \ $(TOP)/src/mem2.c \ $(TOP)/src/mutex.c \ $(TOP)/src/mutex.h \ $(TOP)/src/mutex_os2.c \ $(TOP)/src/mutex_unix.c \ $(TOP)/src/mutex_w32.c \ $(TOP)/src/os.c \ $(TOP)/src/os.h \ $(TOP)/src/os_common.h \ $(TOP)/src/os_os2.c \ $(TOP)/src/os_unix.c \ $(TOP)/src/os_win.c \ $(TOP)/src/pager.c \ $(TOP)/src/pager.h \ $(TOP)/src/parse.y \ $(TOP)/src/pragma.c \ $(TOP)/src/prepare.c \ $(TOP)/src/printf.c \ $(TOP)/src/random.c \ $(TOP)/src/select.c \ $(TOP)/src/shell.c \ $(TOP)/src/sqlite.h.in \ $(TOP)/src/sqlite3ext.h \ $(TOP)/src/sqliteInt.h \ $(TOP)/src/sqliteLimit.h \ $(TOP)/src/table.c \ $(TOP)/src/tclsqlite.c \ $(TOP)/src/tokenize.c \ $(TOP)/src/trigger.c \ $(TOP)/src/utf.c \ $(TOP)/src/update.c \ $(TOP)/src/util.c \ |
︙ | ︙ | |||
195 196 197 198 199 200 201 | parse.h \ sqlite3.h # Source code to the test files. # TESTSRC = \ | < < < < < < < < < < < < | < < < < > > > > > > > > > > > > | < < < < < < | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | parse.h \ sqlite3.h # Source code to the test files. # TESTSRC = \ $(TOP)/src/test1.c \ $(TOP)/src/test2.c \ $(TOP)/src/test3.c \ $(TOP)/src/test4.c \ $(TOP)/src/test5.c \ $(TOP)/src/test6.c \ $(TOP)/src/test7.c \ $(TOP)/src/test8.c \ $(TOP)/src/test9.c \ $(TOP)/src/test_autoext.c \ $(TOP)/src/test_async.c \ $(TOP)/src/test_btree.c \ $(TOP)/src/test_config.c \ $(TOP)/src/test_hexio.c \ $(TOP)/src/test_malloc.c \ $(TOP)/src/test_md5.c \ $(TOP)/src/test_schema.c \ $(TOP)/src/test_server.c \ $(TOP)/src/test_tclvar.c \ TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c TESTSRC2 = \ $(TOP)/src/attach.c $(TOP)/src/btree.c $(TOP)/src/build.c $(TOP)/src/date.c \ $(TOP)/src/expr.c $(TOP)/src/func.c $(TOP)/src/insert.c $(TOP)/src/os.c \ $(TOP)/src/os_os2.c $(TOP)/src/os_unix.c $(TOP)/src/os_win.c \ $(TOP)/src/pager.c $(TOP)/src/pragma.c $(TOP)/src/prepare.c \ $(TOP)/src/printf.c $(TOP)/src/select.c $(TOP)/src/tokenize.c \ $(TOP)/src/utf.c $(TOP)/src/util.c $(TOP)/src/vdbeapi.c $(TOP)/src/vdbeaux.c \ $(TOP)/src/vdbe.c $(TOP)/src/vdbemem.c $(TOP)/src/where.c parse.c # Header files used by all library source files. # HDR = \ $(TOP)/src/btree.h \ $(TOP)/src/btreeInt.h \ $(TOP)/src/hash.h \ keywordhash.h \ $(TOP)/src/mutex.h \ opcodes.h \ $(TOP)/src/os.h \ $(TOP)/src/os_common.h \ $(TOP)/src/pager.h \ parse.h \ sqlite3.h \ $(TOP)/src/sqlite3ext.h \ $(TOP)/src/sqliteInt.h \ $(TOP)/src/sqliteLimit.h \ $(TOP)/src/vdbe.h \ $(TOP)/src/vdbeInt.h # Header files used by extensions # EXTHDR += \ $(TOP)/ext/fts1/fts1.h \ $(TOP)/ext/fts1/fts1_hash.h \ $(TOP)/ext/fts1/fts1_tokenizer.h EXTHDR += \ $(TOP)/ext/fts2/fts2.h \ $(TOP)/ext/fts2/fts2_hash.h \ $(TOP)/ext/fts2/fts2_tokenizer.h EXTHDR += \ $(TOP)/ext/fts3/fts3.h \ $(TOP)/ext/fts3/fts3_hash.h \ $(TOP)/ext/fts3/fts3_tokenizer.h # This is the default Makefile target. The objects listed here # are what get build when you type just "make" with no arguments. # all: sqlite3.h libsqlite3.a sqlite3$(EXE) # Generate the file "last_change" which contains the date of change # of the most recently modified source code file |
︙ | ︙ | |||
302 303 304 305 306 307 308 309 310 | # This target creates a directory named "tsrc" and fills it with # copies of all of the C source code and header files needed to # build on the target system. Some of the C source code and header # files are automatically generated. This target takes care of # all that automatic generation. # target_source: $(SRC) rm -rf tsrc mkdir tsrc | > | | < < < < < < < < < | | < < | < < | < < | < < | < < | < < < < < < < < < < < < < < | < < < < < < < < < < < < < | < < < < < | | | < < < < < < | < < | < < < < < < | < < < < | < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | # This target creates a directory named "tsrc" and fills it with # copies of all of the C source code and header files needed to # build on the target system. Some of the C source code and header # files are automatically generated. This target takes care of # all that automatic generation. # target_source: $(SRC) @echo $(SRC) rm -rf tsrc mkdir tsrc cp -f $(SRC) tsrc rm tsrc/sqlite.h.in tsrc/parse.y sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl tclsh $(TOP)/tool/mksqlite3c.tcl cp sqlite3.c tclsqlite3.c cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c tclsh $(TOP)/tool/mksqlite3internalh.tcl fts2amal.c: target_source $(TOP)/ext/fts2/mkfts2amal.tcl tclsh $(TOP)/ext/fts2/mkfts2amal.tcl fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl tclsh $(TOP)/ext/fts3/mkfts3amal.tcl # Rules to build the LEMON compiler generator # lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c $(BCC) -o lemon $(TOP)/tool/lemon.c cp $(TOP)/tool/lempar.c . # Rules to build individual *.o files from files in the src directory. # %.o: %.c $(HDR) $(TCCX) -c $< # Rules to build individual *.o files from generated *.c files. This # applies to: # # parse.o # opcodes.o # %.o: $(TOP)/src/%.c $(HDR) $(TCCX) -c $< tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR) $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c # Rules to build opcodes.c and opcodes.h # opcodes.c: opcodes.h $(TOP)/mkopcodec.awk sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk cat parse.h $(TOP)/src/vdbe.c |$(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h # Rules to build parse.c and parse.h - the outputs of lemon. # parse.h: parse.c parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk cp $(TOP)/src/parse.y . ./lemon $(OPTS) parse.y mv parse.h parse.h.temp awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h sqlite3.h: $(TOP)/src/sqlite.h.in sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \ -e s/--VERSION-NUMBER--/`cat ${TOP}/VERSION | sed 's/[^0-9]/ /g' | $(NAWK) '{printf "%d%03d%03d",$$1,$$2,$$3}'`/ \ $(TOP)/src/sqlite.h.in >sqlite3.h keywordhash.h: $(TOP)/tool/mkkeywordhash.c $(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c ./mkkeywordhash >keywordhash.h # Rules to build the extension objects. # icu.o: $(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR) $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c fts2.o: $(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR) |
︙ | ︙ | |||
560 561 562 563 564 565 566 | # Rules for building test programs and for running tests # tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \ $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB) | | > > | > > > > > | > > > | | | > | | > | > | | | | < < < | | < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | # Rules for building test programs and for running tests # tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \ $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB) # Rules to build the 'testfixture' application. # TESTFIXTURE_FLAGS = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c $(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \ $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c $(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \ $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) fulltest: testfixture$(EXE) sqlite3$(EXE) ./testfixture$(EXE) $(TOP)/test/all.test soaktest: testfixture$(EXE) sqlite3$(EXE) ./testfixture$(EXE) $(TOP)/test/all.test -soak 1 test: testfixture$(EXE) sqlite3$(EXE) ./testfixture$(EXE) $(TOP)/test/quick.test sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \ $(TOP)/tool/spaceanal.tcl sed \ -e '/^#/d' \ -e 's,\\,\\\\,g' \ -e 's,",\\",g' \ -e 's,^,",' \ -e 's,$$,\\n",' \ $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h $(TCCX) $(TCL_FLAGS) \ -DTCLSH=2 -DSQLITE_TEST=1 -DSQLITE_DEBUG=1 -DSQLITE_PRIVATE="" \ $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ -o sqlite3_analyzer$(EXE) \ $(LIBTCL) $(THREADLIB) TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO) $(TEST_EXTENSION): $(TOP)/src/test_loadext.c $(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION) extensiontest: testfixture$(EXE) $(TEST_EXTENSION) ./testfixture$(EXE) $(TOP)/test/loadext.test # Rules used to build documentation # %.html: $(TOP)/www/%.tcl docdir last_change common.tcl tclsh $< > $@ lang.html: $(TOP)/www/lang.tcl docdir tclsh $(TOP)/www/lang.tcl doc >lang.html opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html capi3ref.html: $(TOP)/www/mkapidoc.tcl sqlite3.h tclsh $(TOP)/www/mkapidoc.tcl <sqlite3.h >capi3ref.html %: $(TOP)/www/% cp $< $@ # Files to be published on the website. # DOC = \ arch.html \ autoinc.html \ c_interface.html \ |
︙ | ︙ | |||
770 771 772 773 774 775 776 | support.html \ tclsqlite.html \ vdbe.html \ version3.html \ whentouse.html \ 34to35.html | | > > | 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 | support.html \ tclsqlite.html \ vdbe.html \ version3.html \ whentouse.html \ 34to35.html docdir: mkdir -p doc doc: common.tcl $(DOC) docdir mv $(DOC) doc cp $(TOP)/www/*.gif $(TOP)/art/*.gif doc # Standard install and cleanup targets # install: sqlite3 libsqlite3.a sqlite3.h mv sqlite3 /usr/bin |
︙ | ︙ |
Changes to src/expr.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** ** $Id: expr.c,v 1.311 2007/08/31 17:42:48 danielk1977 Exp $ */ #include "sqliteInt.h" #include <ctype.h> /* ** Return the 'affinity' of the expression pExpr if any. ** |
︙ | ︙ | |||
700 701 702 703 704 705 706 | ){ if( pEList && pEList->nExpr>iLimit ){ sqlite3ErrorMsg(pParse, "too many columns in %s", zObject); } } | | | 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 | ){ if( pEList && pEList->nExpr>iLimit ){ sqlite3ErrorMsg(pParse, "too many columns in %s", zObject); } } #if defined(SQLITE_TEST) || SQLITE_MAX_EXPR_DEPTH>0 /* The following three functions, heightOfExpr(), heightOfExprList() ** and heightOfSelect(), are used to determine the maximum height ** of any expression tree referenced by the structure passed as the ** first argument. ** ** If this maximum height is greater than the current value pointed ** to by pnHeight, the second parameter, then set *pnHeight to that |
︙ | ︙ | |||
1480 1481 1482 1483 1484 1485 1486 | */ int sqlite3ExprResolveNames( NameContext *pNC, /* Namespace to resolve expressions in. */ Expr *pExpr /* The expression to be analyzed. */ ){ int savedHasAgg; if( pExpr==0 ) return 0; | | | | 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 | */ int sqlite3ExprResolveNames( NameContext *pNC, /* Namespace to resolve expressions in. */ Expr *pExpr /* The expression to be analyzed. */ ){ int savedHasAgg; if( pExpr==0 ) return 0; #if defined(SQLITE_TEST) || SQLITE_MAX_EXPR_DEPTH>0 if( (pExpr->nHeight+pNC->pParse->nHeight)>SQLITE_MAX_EXPR_DEPTH ){ sqlite3ErrorMsg(pNC->pParse, "Expression tree is too large (maximum depth %d)", SQLITE_MAX_EXPR_DEPTH ); return 1; } pNC->pParse->nHeight += pExpr->nHeight; #endif savedHasAgg = pNC->hasAgg; pNC->hasAgg = 0; walkExprTree(pExpr, nameResolverStep, pNC); #if defined(SQLITE_TEST) || SQLITE_MAX_EXPR_DEPTH>0 pNC->pParse->nHeight -= pExpr->nHeight; #endif if( pNC->nErr>0 ){ ExprSetProperty(pExpr, EP_Error); } if( pNC->hasAgg ){ ExprSetProperty(pExpr, EP_Agg); |
︙ | ︙ |
Changes to src/select.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** ** $Id: select.c,v 1.359 2007/08/31 17:42:48 danielk1977 Exp $ */ #include "sqliteInt.h" /* ** Delete all the content of a Select structure but do not deallocate ** the select structure itself. |
︙ | ︙ | |||
3015 3016 3017 3018 3019 3020 3021 | if( pItem->zName!=0 ){ zSavedAuthContext = pParse->zAuthContext; pParse->zAuthContext = pItem->zName; needRestoreContext = 1; }else{ needRestoreContext = 0; } | | | | 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 | if( pItem->zName!=0 ){ zSavedAuthContext = pParse->zAuthContext; pParse->zAuthContext = pItem->zName; needRestoreContext = 1; }else{ needRestoreContext = 0; } #if defined(SQLITE_TEST) || SQLITE_MAX_EXPR_DEPTH>0 /* Increment Parse.nHeight by the height of the largest expression ** tree refered to by this, the parent select. The child select ** may contain expression trees of at most ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit ** more conservative than necessary, but much easier than enforcing ** an exact limit. */ pParse->nHeight += sqlite3SelectExprHeight(p); #endif sqlite3Select(pParse, pItem->pSelect, SRT_EphemTab, pItem->iCursor, p, i, &isAgg, 0); #if defined(SQLITE_TEST) || SQLITE_MAX_EXPR_DEPTH>0 pParse->nHeight -= sqlite3SelectExprHeight(p); #endif if( needRestoreContext ){ pParse->zAuthContext = zSavedAuthContext; } pTabList = p->pSrc; pWhere = p->pWhere; |
︙ | ︙ |
Changes to src/sqliteInt.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* ** 2001 September 15 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** Internal interface definitions for SQLite. ** | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | /* ** 2001 September 15 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** Internal interface definitions for SQLite. ** ** @(#) $Id: sqliteInt.h,v 1.607 2007/08/31 17:42:48 danielk1977 Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ #include "sqliteLimit.h" #ifdef SQLITE_TEST #undef SQLITE_MAX_LENGTH #undef SQLITE_MAX_COLUMN #undef SQLITE_MAX_SQL_LENGTH #undef SQLITE_MAX_EXPR_DEPTH #undef SQLITE_MAX_COMPOUND_SELECT #undef SQLITE_MAX_VDBE_OP #undef SQLITE_MAX_FUNCTION_ARG #undef SQLITE_MAX_VARIABLE_NUMBER #undef SQLITE_MAX_PAGE_SIZE #undef SQLITE_MAX_PAGE_COUNT #undef SQLITE_MAX_LIKE_PATTERN_LENGTH #define SQLITE_MAX_LENGTH sqlite3MAX_LENGTH #define SQLITE_MAX_COLUMN sqlite3MAX_COLUMN #define SQLITE_MAX_SQL_LENGTH sqlite3MAX_SQL_LENGTH #define SQLITE_MAX_EXPR_DEPTH sqlite3MAX_EXPR_DEPTH #define SQLITE_MAX_COMPOUND_SELECT sqlite3MAX_COMPOUND_SELECT #define SQLITE_MAX_VDBE_OP sqlite3MAX_VDBE_OP #define SQLITE_MAX_FUNCTION_ARG sqlite3MAX_FUNCTION_ARG #define SQLITE_MAX_VARIABLE_NUMBER sqlite3MAX_VARIABLE_NUMBER #define SQLITE_MAX_PAGE_SIZE sqlite3MAX_PAGE_SIZE #define SQLITE_MAX_PAGE_COUNT sqlite3MAX_PAGE_COUNT #define SQLITE_MAX_LIKE_PATTERN_LENGTH sqlite3MAX_LIKE_PATTERN_LENGTH extern int sqlite3MAX_LENGTH; extern int sqlite3MAX_COLUMN; extern int sqlite3MAX_SQL_LENGTH; extern int sqlite3MAX_EXPR_DEPTH; extern int sqlite3MAX_COMPOUND_SELECT; extern int sqlite3MAX_VDBE_OP; extern int sqlite3MAX_FUNCTION_ARG; extern int sqlite3MAX_VARIABLE_NUMBER; extern int sqlite3MAX_PAGE_SIZE; extern int sqlite3MAX_PAGE_COUNT; extern int sqlite3MAX_LIKE_PATTERN_LENGTH; #endif #define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ #if defined(SQLITE_TCL) || defined(TCLSH) # include <tcl.h> #endif |
︙ | ︙ | |||
969 970 971 972 973 974 975 | AggInfo *pAggInfo; /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */ int iAgg; /* Which entry in pAggInfo->aCol[] or ->aFunc[] */ int iRightJoinTable; /* If EP_FromJoin, the right table of the join */ Select *pSelect; /* When the expression is a sub-select. Also the ** right side of "<expr> IN (<select>)" */ Table *pTab; /* Table for OP_Column expressions. */ Schema *pSchema; | | | 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 | AggInfo *pAggInfo; /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */ int iAgg; /* Which entry in pAggInfo->aCol[] or ->aFunc[] */ int iRightJoinTable; /* If EP_FromJoin, the right table of the join */ Select *pSelect; /* When the expression is a sub-select. Also the ** right side of "<expr> IN (<select>)" */ Table *pTab; /* Table for OP_Column expressions. */ Schema *pSchema; #if defined(SQLITE_TEST) || SQLITE_MAX_EXPR_DEPTH>0 int nHeight; /* Height of the tree headed by this node */ #endif }; /* ** The following are the meanings of bits in the Expr.flags field. */ |
︙ | ︙ | |||
1317 1318 1319 1320 1321 1322 1323 | TriggerStack *trigStack; /* Trigger actions being coded */ const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */ #ifndef SQLITE_OMIT_VIRTUALTABLE Token sArg; /* Complete text of a module argument */ u8 declareVtab; /* True if inside sqlite3_declare_vtab() */ Table *pVirtualLock; /* Require virtual table lock on this table */ #endif | | | 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 | TriggerStack *trigStack; /* Trigger actions being coded */ const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */ #ifndef SQLITE_OMIT_VIRTUALTABLE Token sArg; /* Complete text of a module argument */ u8 declareVtab; /* True if inside sqlite3_declare_vtab() */ Table *pVirtualLock; /* Require virtual table lock on this table */ #endif #if defined(SQLITE_TEST) || SQLITE_MAX_EXPR_DEPTH>0 int nHeight; /* Expression tree height of current sub-select */ #endif }; #ifdef SQLITE_OMIT_VIRTUALTABLE #define IN_DECLARE_VTAB 0 #else |
︙ | ︙ | |||
1872 1873 1874 1875 1876 1877 1878 | int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int); int sqlite3JournalSize(sqlite3_vfs *); int sqlite3JournalCreate(sqlite3_file *); #else #define sqlite3JournalSize(pVfs) ((pVfs)->szOsFile) #endif | | | 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 | int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int); int sqlite3JournalSize(sqlite3_vfs *); int sqlite3JournalCreate(sqlite3_file *); #else #define sqlite3JournalSize(pVfs) ((pVfs)->szOsFile) #endif #if defined(SQLITE_TEST) || SQLITE_MAX_EXPR_DEPTH>0 void sqlite3ExprSetHeight(Expr *); int sqlite3SelectExprHeight(Select *); #else #define sqlite3ExprSetHeight(x) #endif u32 sqlite3Get4byte(const u8*); |
︙ | ︙ |
Changes to src/test1.c.
︙ | ︙ | |||
9 10 11 12 13 14 15 | ** May you share freely, never taking more than you give. ** ************************************************************************* ** Code for testing all sorts of SQLite interfaces. This code ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ** May you share freely, never taking more than you give. ** ************************************************************************* ** Code for testing all sorts of SQLite interfaces. This code ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** ** $Id: test1.c,v 1.272 2007/08/31 17:42:48 danielk1977 Exp $ */ #include "sqliteInt.h" #include "tcl.h" #include <stdlib.h> #include <string.h> /* |
︙ | ︙ | |||
4349 4350 4351 4352 4353 4354 4355 | #ifndef SQLITE_OMIT_INCRBLOB { "sqlite3_blob_read", test_blob_read, 0 }, { "sqlite3_blob_write", test_blob_write, 0 }, #endif }; static int bitmask_size = sizeof(Bitmask)*8; int i; | < > | 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 | #ifndef SQLITE_OMIT_INCRBLOB { "sqlite3_blob_read", test_blob_read, 0 }, { "sqlite3_blob_write", test_blob_write, 0 }, #endif }; static int bitmask_size = sizeof(Bitmask)*8; int i; extern int sqlite3_sync_count, sqlite3_fullsync_count; extern int sqlite3_opentemp_count; extern int sqlite3_like_count; extern int sqlite3_xferopt_count; extern int sqlite3_pager_readdb_count; extern int sqlite3_pager_writedb_count; extern int sqlite3_pager_writej_count; extern int sqlite3_pager_pgfree_count; #if OS_UNIX && defined(SQLITE_TEST) && SQLITE_THREADSAFE extern int threadsOverrideEachOthersLocks; #endif #if OS_WIN extern int sqlite3_os_type; #endif #ifdef SQLITE_DEBUG extern int sqlite3_where_trace; extern int sqlite3_os_trace; extern int sqlite3_vdbe_addop_trace; #endif #ifdef SQLITE_TEST extern char sqlite3_query_plan[]; static char *query_plan = sqlite3_query_plan; #endif |
︙ | ︙ |
Changes to src/test_config.c.
︙ | ︙ | |||
12 13 14 15 16 17 18 | ** ** This file contains code used for testing the SQLite system. ** None of the code in this file goes into a deliverable build. ** ** The focus of this file is providing the TCL testing layer ** access to compile-time constants. ** | | > > > > > > > > > > > > > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ** ** This file contains code used for testing the SQLite system. ** None of the code in this file goes into a deliverable build. ** ** The focus of this file is providing the TCL testing layer ** access to compile-time constants. ** ** $Id: test_config.c,v 1.14 2007/08/31 17:42:48 danielk1977 Exp $ */ #include "sqliteLimit.h" int sqlite3MAX_LENGTH = SQLITE_MAX_LENGTH; int sqlite3MAX_COLUMN = SQLITE_MAX_COLUMN; int sqlite3MAX_SQL_LENGTH = SQLITE_MAX_SQL_LENGTH; int sqlite3MAX_EXPR_DEPTH = SQLITE_MAX_EXPR_DEPTH; int sqlite3MAX_COMPOUND_SELECT = SQLITE_MAX_COMPOUND_SELECT; int sqlite3MAX_VDBE_OP = SQLITE_MAX_VDBE_OP; int sqlite3MAX_FUNCTION_ARG = SQLITE_MAX_FUNCTION_ARG; int sqlite3MAX_VARIABLE_NUMBER = SQLITE_MAX_VARIABLE_NUMBER; int sqlite3MAX_PAGE_SIZE = SQLITE_MAX_PAGE_SIZE; int sqlite3MAX_PAGE_COUNT = SQLITE_MAX_PAGE_COUNT; int sqlite3MAX_LIKE_PATTERN_LENGTH = SQLITE_MAX_LIKE_PATTERN_LENGTH; #include "sqliteInt.h" #include "tcl.h" #include <stdlib.h> #include <string.h> /* ** This routine sets entries in the global ::sqlite_options() array variable |
︙ | ︙ | |||
389 390 391 392 393 394 395 | #ifdef SQLITE_OMIT_VIRTUALTABLE Tcl_SetVar2(interp, "sqlite_options", "vtab", "0", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "vtab", "1", TCL_GLOBAL_ONLY); #endif | < < > | < | < | | < < < < | < < < < | < < < < | < < < < | < < < | > | < > > | < < < < < < < < < < < < < < < < < < < < | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | #ifdef SQLITE_OMIT_VIRTUALTABLE Tcl_SetVar2(interp, "sqlite_options", "vtab", "0", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "vtab", "1", TCL_GLOBAL_ONLY); #endif #define LINKVAR(x) \ Tcl_LinkVar(interp, "SQLITE_" #x, (char *)&(sqlite3 ## x), TCL_LINK_INT) LINKVAR( MAX_LENGTH ); LINKVAR( MAX_COLUMN ); LINKVAR( MAX_SQL_LENGTH ); LINKVAR( MAX_EXPR_DEPTH ); LINKVAR( MAX_COMPOUND_SELECT ); LINKVAR( MAX_VDBE_OP ); LINKVAR( MAX_FUNCTION_ARG ); LINKVAR( MAX_VARIABLE_NUMBER ); LINKVAR( MAX_PAGE_SIZE ); LINKVAR( MAX_PAGE_COUNT ); LINKVAR( MAX_LIKE_PATTERN_LENGTH ); { static int sqlite_default_temp_cache_size = SQLITE_DEFAULT_TEMP_CACHE_SIZE; Tcl_LinkVar(interp, "SQLITE_DEFAULT_TEMP_CACHE_SIZE", (char*)&sqlite_default_temp_cache_size, TCL_LINK_INT|TCL_LINK_READ_ONLY); } { static int sqlite_default_cache_size = SQLITE_DEFAULT_CACHE_SIZE; Tcl_LinkVar(interp, "SQLITE_DEFAULT_CACHE_SIZE", (char*)&sqlite_default_cache_size, TCL_LINK_INT|TCL_LINK_READ_ONLY); } { static int sqlite_default_page_size = SQLITE_DEFAULT_PAGE_SIZE; Tcl_LinkVar(interp, "SQLITE_DEFAULT_PAGE_SIZE", (char*)&sqlite_default_page_size, TCL_LINK_INT|TCL_LINK_READ_ONLY); } { static int temp_store = TEMP_STORE; Tcl_LinkVar(interp, "TEMP_STORE", (char*)&temp_store, TCL_LINK_INT|TCL_LINK_READ_ONLY); } { static int sqlite_default_file_format = SQLITE_DEFAULT_FILE_FORMAT; Tcl_LinkVar(interp, "SQLITE_DEFAULT_FILE_FORMAT", (char*)&sqlite_default_file_format, TCL_LINK_INT|TCL_LINK_READ_ONLY); } { static int sqlite_max_attached = SQLITE_MAX_ATTACHED; Tcl_LinkVar(interp, "SQLITE_MAX_ATTACHED", (char*)&sqlite_max_attached, TCL_LINK_INT|TCL_LINK_READ_ONLY); } } |
︙ | ︙ |
Changes to test/all.test.
1 2 3 4 5 6 7 8 9 10 11 12 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file runs all tests. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file runs all tests. # # $Id: all.test,v 1.47 2007/08/31 17:42:48 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl rename finish_test really_finish_test proc finish_test {} { # no-op } |
︙ | ︙ | |||
48 49 50 51 52 53 54 | # LeakList will hold a list of the number of unfreed mallocs after # each round of the test. This number should be constant. If it # grows, it may mean there is a memory leak in the library. # set LeakList {} | | | | | | | | | | | | | | < | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | # LeakList will hold a list of the number of unfreed mallocs after # each round of the test. This number should be constant. If it # grows, it may mean there is a memory leak in the library. # set LeakList {} set EXCLUDE {} lappend EXCLUDE all.test ;# This file lappend EXCLUDE async.test lappend EXCLUDE crash.test ;# Run seperately later. lappend EXCLUDE crash2.test ;# Run seperately later. lappend EXCLUDE autovacuum_crash.test ;# Run seperately later. lappend EXCLUDE quick.test ;# Alternate test driver script lappend EXCLUDE malloc.test ;# Run seperately later. lappend EXCLUDE misuse.test ;# Run seperately later. lappend EXCLUDE memleak.test ;# Alternate test driver script lappend EXCLUDE sqllimits1.test ;# Default values use too much memory lappend EXCLUDE fuzz.test lappend EXCLUDE soak.test ;# Takes a very long time (default 1 hr) # Files to include in the test. If this list is empty then everything # that is not in the EXCLUDE list is run. # set INCLUDE { } |
︙ | ︙ |
Changes to test/date.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 2003 October 31 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing date and time functions. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 2003 October 31 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing date and time functions. # # $Id: date.test,v 1.23 2007/08/31 17:42:48 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Skip this whole file if date and time functions are omitted # at compile-time # |
︙ | ︙ | |||
229 230 231 232 233 234 235 236 237 238 239 240 241 242 | set sqlite_current_time \ [db eval {SELECT strftime('%s','2000-07-01 12:34:56')}] datetest 6.16 {datetime('now','localtime')} {2000-07-01 08:34:56} datetest 6.17 {datetime('now','localtimex')} NULL datetest 6.18 {datetime('now','localtim')} NULL set sqlite_current_time 0 } # Date-time functions that contain NULL arguments return a NULL # result. # datetest 7.1 {datetime(null)} NULL datetest 7.2 {datetime('now',null)} NULL datetest 7.3 {datetime('now','localtime',null)} NULL | > > > > > > > | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | set sqlite_current_time \ [db eval {SELECT strftime('%s','2000-07-01 12:34:56')}] datetest 6.16 {datetime('now','localtime')} {2000-07-01 08:34:56} datetest 6.17 {datetime('now','localtimex')} NULL datetest 6.18 {datetime('now','localtim')} NULL set sqlite_current_time 0 } # These two are a bit of a scam. They are added to ensure that 100% of # the date.c file is covered by testing, even when the time-zone # is not -0400 (the condition for running of the block of tests above). # datetest 6.19 {datetime('2039-07-01 12:00:00','localtime',null)} NULL datetest 6.20 {datetime('2039-07-01 12:00:00','utc',null)} NULL # Date-time functions that contain NULL arguments return a NULL # result. # datetest 7.1 {datetime(null)} NULL datetest 7.2 {datetime('now',null)} NULL datetest 7.3 {datetime('now','localtime',null)} NULL |
︙ | ︙ |
Changes to test/sqllimits1.test.
︙ | ︙ | |||
8 9 10 11 12 13 14 | # May you share freely, never taking more than you give. # #*********************************************************************** # # This file contains tests to verify that the limits defined in # sqlite source file limits.h are enforced. # | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # May you share freely, never taking more than you give. # #*********************************************************************** # # This file contains tests to verify that the limits defined in # sqlite source file limits.h are enforced. # # $Id: sqllimits1.test,v 1.11 2007/08/31 17:42:48 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Test organization: # # sqllimits-1.*: SQLITE_MAX_LENGTH |
︙ | ︙ | |||
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # sqllimits-10.*: SQLITE_MAX_PAGE_SIZE # sqllimits-11.*: SQLITE_MAX_LIKE_PATTERN_LENGTH # # Todo: # # sqllimits-5.*: SQLITE_MAX_EXPR_DEPTH (sqlite todo) # sqllimits-6.*: SQLITE_MAX_VDBE_OP (sqlite todo) # #-------------------------------------------------------------------- # Test cases sqllimits-1.* test that the SQLITE_MAX_LENGTH limit # is enforced. # do_test sqllimits-1.1.1 { catchsql { SELECT randomblob(2147483647) } | > > > > > > > > > > > > > | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # sqllimits-10.*: SQLITE_MAX_PAGE_SIZE # sqllimits-11.*: SQLITE_MAX_LIKE_PATTERN_LENGTH # # Todo: # # sqllimits-5.*: SQLITE_MAX_EXPR_DEPTH (sqlite todo) # sqllimits-6.*: SQLITE_MAX_VDBE_OP (sqlite todo) # sqllimits-12.*: SQLITE_MAX_PAGE_COUNT (sqlite todo) # set SQLITE_MAX_LENGTH 1000000 set SQLITE_MAX_COLUMN set SQLITE_MAX_SQL_LENGTH 100000 set SQLITE_MAX_EXPR_DEPTH 1000 set SQLITE_MAX_COMPOUND_SELECT 5 set SQLITE_MAX_VDBE_OP set SQLITE_MAX_FUNCTION_ARG set SQLITE_MAX_VARIABLE_NUMBER set SQLITE_MAX_PAGE_SIZE set SQLITE_MAX_PAGE_COUNT set SQLITE_MAX_LIKE_PATTERN_LENGTH 1000 #-------------------------------------------------------------------- # Test cases sqllimits-1.* test that the SQLITE_MAX_LENGTH limit # is enforced. # do_test sqllimits-1.1.1 { catchsql { SELECT randomblob(2147483647) } |
︙ | ︙ | |||
66 67 68 69 70 71 72 | do_test sqllimits-1.5 { catchsql { SELECT quote(zeroblob($::LARGESIZE)) } } {1 {string or blob too big}} do_test sqllimits-1.6 { catchsql { SELECT zeroblob(-1) } | | | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | do_test sqllimits-1.5 { catchsql { SELECT quote(zeroblob($::LARGESIZE)) } } {1 {string or blob too big}} do_test sqllimits-1.6 { catchsql { SELECT zeroblob(-1) } } {0 {{}}} do_test sqllimits-1.9 { set ::str [string repeat A 65537] set ::rep [string repeat B 65537] catchsql { SELECT replace($::str, 'A', $::rep) } } {1 {string or blob too big}} |
︙ | ︙ | |||
346 347 348 349 350 351 352 353 354 355 356 357 358 359 | #-------------------------------------------------------------------- # Test cases sqllimits-8.*: Test the SQLITE_MAX_ATTACHED limit. # # TODO do_test sqllimits-1.8.1 { set max $::SQLITE_MAX_ATTACHED for {set i 0} {$i < ($max)} {incr i} { execsql "ATTACH 'test${i}.db' AS aux${i}" } catchsql "ATTACH 'test${i}.db' AS aux${i}" } "1 {too many attached databases - max $::SQLITE_MAX_ATTACHED}" do_test sqllimits-1.8.2 { set max $::SQLITE_MAX_ATTACHED | > > > | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | #-------------------------------------------------------------------- # Test cases sqllimits-8.*: Test the SQLITE_MAX_ATTACHED limit. # # TODO do_test sqllimits-1.8.1 { set max $::SQLITE_MAX_ATTACHED for {set i 0} {$i < ($max)} {incr i} { file delete -force test${i}.db test${i}.db-journal } for {set i 0} {$i < ($max)} {incr i} { execsql "ATTACH 'test${i}.db' AS aux${i}" } catchsql "ATTACH 'test${i}.db' AS aux${i}" } "1 {too many attached databases - max $::SQLITE_MAX_ATTACHED}" do_test sqllimits-1.8.2 { set max $::SQLITE_MAX_ATTACHED |
︙ | ︙ |