Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Merge recent fixes and enhancements from trunk. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | apple-osx |
Files: | files | file ages | folders |
SHA1: |
f073401792c0a093d4324fc2636170f1 |
User & Date: | drh 2016-02-09 15:50:33.582 |
Context
2016-02-13
| ||
17:35 | Merge changes from the 3.11.0 release candidate. (check-in: d198a6db2e user: drh tags: apple-osx) | |
2016-02-09
| ||
15:50 | Merge recent fixes and enhancements from trunk. (check-in: f073401792 user: drh tags: apple-osx) | |
02:12 | Make sure every co-routines has its own set of temporary registers and does not share temporaries, since a co-routine might expect the content of a temporary register to be preserved across an OP_Yield. Proposed fix for ticket [d06a25c84454a]. (check-in: ca72be8618 user: drh tags: trunk) | |
2016-02-05
| ||
14:29 | Merge OOM handling optimizations and PRAGMA synchronous=EXTRA as well as other enhancements from trunk. (check-in: 201fcbeef3 user: drh tags: apple-osx) | |
Changes
Changes to Makefile.in.
︙ | |||
590 591 592 593 594 595 596 597 598 599 600 601 602 603 | 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | + + + + + + | sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \ $(TOP)/src/shell.c libsqlite3.la \ $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)" sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) srcck1$(BEXE): $(TOP)/tool/srcck1.c $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c sourcetest: srcck1$(BEXE) sqlite3.c ./srcck1 sqlite3.c fuzzershell$(TEXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h $(LTLINK) -o $@ $(FUZZERSHELL_OPT) \ $(TOP)/tool/fuzzershell.c sqlite3.c $(TLIBS) fuzzcheck$(TEXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h $(LTLINK) -o $@ $(FUZZCHECK_OPT) $(TOP)/test/fuzzcheck.c sqlite3.c $(TLIBS) |
︙ | |||
1091 1092 1093 1094 1095 1096 1097 | 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 | - + | # quicktest: ./testfixture$(TEXE) ./testfixture$(TEXE) $(TOP)/test/extraquick.test $(TESTOPTS) # This is the common case. Run many tests that do not take too long, # including fuzzcheck, sqlite3_analyzer, and sqldiff tests. # |
︙ | |||
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 | 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 | + | rm -f sqlite3.c rm -f sqlite3rc.h rm -f shell.c sqlite3ext.h rm -f sqlite3_analyzer$(TEXE) sqlite3_analyzer.c rm -f sqlite-*-output.vsix rm -f mptester mptester.exe rm -f rbu rbu.exe rm -f srcck1 srcck1.exe rm -f fuzzershell fuzzershell.exe rm -f fuzzcheck fuzzcheck.exe rm -f sqldiff sqldiff.exe rm -f fts5.* fts5parse.* distclean: clean rm -f config.h config.log config.status libtool Makefile sqlite3.pc |
︙ |
Changes to Makefile.msc.
︙ | |||
262 263 264 265 266 267 268 269 270 271 272 273 274 275 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | + + + + + + + + + | EXT_FEATURE_FLAGS = !ENDIF !ENDIF ############################################################################### ############################### END OF OPTIONS ################################ ############################################################################### # When compiling for the Windows 10 platform, the PLATFORM macro must be set # to an appropriate value (e.g. x86, x64, arm, arm64, etc). # !IF $(FOR_WIN10)!=0 !IFNDEF PLATFORM !ERROR Using the FOR_WIN10 option requires a value for PLATFORM. !ENDIF !ENDIF # This assumes that MSVC is always installed in 32-bit Program Files directory # and sets the variable for use in locating other 32-bit installs accordingly. # PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\.. PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\) |
︙ | |||
293 294 295 296 297 298 299 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | - + | # compiler binary for the target platform. If it is not defined, simply define # it to the legacy default value 'rc.exe'. # !IFNDEF RC RC = rc.exe !ENDIF |
︙ | |||
330 331 332 333 334 335 336 | 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 383 | - + - + + + + + + + + + + + | !ELSEIF $(XCOMPILE)!=0 NCC = "$(VCINSTALLDIR)\bin\$(CC)" NCC = $(NCC:\\=\) !ELSE NCC = $(CC) !ENDIF |
︙ | |||
537 538 539 540 541 542 543 | 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | - + | !ENDIF # Also, we need to dynamically link to the correct MSVC runtime # when compiling for WinRT (e.g. debug or release) OR if the # USE_CRT_DLL option is set to force dynamically linking to the # MSVC runtime library. # |
︙ | |||
884 885 886 887 888 889 890 | 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 | + - + + + + + + + + + + | LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" !ENDIF LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib !ENDIF # When compiling for UAP or the Windows 10 platform, some extra linker |
︙ | |||
1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 | 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 | + + + + + + | $(SQLITE3EXE): $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H) $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\src\shell.c $(SHELL_CORE_SRC) \ /link $(SQLITE3EXEPDB) $(LDFLAGS) $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) # <<mark>> sqldiff.exe: $(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H) $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) srcck1.exe: $(TOP)\tool\srcck1.c $(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c sourcetest: srcck1.exe sqlite3.c srcck1.exe sqlite3.c fuzzershell.exe: $(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H) $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) fuzzcheck.exe: $(TOP)\test\fuzzcheck.c $(SQLITE3C) $(SQLITE3H) $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(TOP)\test\fuzzcheck.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) |
︙ | |||
1912 1913 1914 1915 1916 1917 1918 | 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 | - + - + | .\fuzzcheck.exe $(FUZZDATA) fastfuzztest: fuzzcheck.exe .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA) # Minimal testing that runs in less than 3 minutes (on a fast machine) # |
︙ | |||
2006 2007 2008 2009 2010 2011 2012 | 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 | - + | -rmdir /Q/S tsrc 2>NUL del /Q .target_source 2>NUL del /Q tclsqlite3.exe 2>NUL del /Q testloadext.dll 2>NUL del /Q testfixture.exe test.db 2>NUL del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe 2>NUL del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL |
Changes to autoconf/Makefile.msc.
︙ | |||
247 248 249 250 251 252 253 254 255 256 257 258 259 260 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | + + + + + + + + + | EXT_FEATURE_FLAGS = !ENDIF !ENDIF ############################################################################### ############################### END OF OPTIONS ################################ ############################################################################### # When compiling for the Windows 10 platform, the PLATFORM macro must be set # to an appropriate value (e.g. x86, x64, arm, arm64, etc). # !IF $(FOR_WIN10)!=0 !IFNDEF PLATFORM !ERROR Using the FOR_WIN10 option requires a value for PLATFORM. !ENDIF !ENDIF # This assumes that MSVC is always installed in 32-bit Program Files directory # and sets the variable for use in locating other 32-bit installs accordingly. # PROGRAMFILES_X86 = $(VCINSTALLDIR)\..\.. PROGRAMFILES_X86 = $(PROGRAMFILES_X86:\\=\) |
︙ | |||
278 279 280 281 282 283 284 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | - + | # compiler binary for the target platform. If it is not defined, simply define # it to the legacy default value 'rc.exe'. # !IFNDEF RC RC = rc.exe !ENDIF |
︙ | |||
315 316 317 318 319 320 321 | 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 | - + - + + + + + + + + + + + | !ELSEIF $(XCOMPILE)!=0 NCC = "$(VCINSTALLDIR)\bin\$(CC)" NCC = $(NCC:\\=\) !ELSE NCC = $(CC) !ENDIF |
︙ | |||
522 523 524 525 526 527 528 | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | - + | !ENDIF # Also, we need to dynamically link to the correct MSVC runtime # when compiling for WinRT (e.g. debug or release) OR if the # USE_CRT_DLL option is set to force dynamically linking to the # MSVC runtime library. # |
︙ | |||
779 780 781 782 783 784 785 | 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 | + - + + + + + + + + + + | LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" !ENDIF LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib !ENDIF # When compiling for UAP or the Windows 10 platform, some extra linker |
︙ |
Changes to ext/fts3/fts3_tokenizer.c.
︙ | |||
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + + + + + + + - + + | pHash = (Fts3Hash *)sqlite3_user_data(context); zName = sqlite3_value_text(argv[0]); nName = sqlite3_value_bytes(argv[0])+1; if( argc==2 ){ #ifdef SQLITE_ENABLE_FTS3_TOKENIZER void *pOld; int n = sqlite3_value_bytes(argv[1]); if( zName==0 || n!=sizeof(pPtr) ){ sqlite3_result_error(context, "argument type mismatch", -1); return; } pPtr = *(void **)sqlite3_value_blob(argv[1]); pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr); if( pOld==pPtr ){ sqlite3_result_error(context, "out of memory", -1); return; } #else sqlite3_result_error(context, "fts3tokenize: " "disabled - rebuild with -DSQLITE_ENABLE_FTS3_TOKENIZER", -1 ); return; #endif /* SQLITE_ENABLE_FTS3_TOKENIZER */ |
︙ | |||
324 325 326 327 328 329 330 331 332 333 334 335 336 337 | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | + | sqlite3_result_error(context, zErr, -1); }else{ sqlite3_result_text(context, Tcl_GetString(pRet), -1, SQLITE_TRANSIENT); } Tcl_DecrRefCount(pRet); } #ifdef SQLITE_ENABLE_FTS3_TOKENIZER static int registerTokenizer( sqlite3 *db, char *zName, const sqlite3_tokenizer_module *p ){ int rc; |
︙ | |||
345 346 347 348 349 350 351 352 353 354 355 356 357 358 | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | + + | sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC); sqlite3_bind_blob(pStmt, 2, &p, sizeof(p), SQLITE_STATIC); sqlite3_step(pStmt); return sqlite3_finalize(pStmt); } #endif /* SQLITE_ENABLE_FTS3_TOKENIZER */ static int queryTokenizer( sqlite3 *db, char *zName, const sqlite3_tokenizer_module **pp ){ |
︙ | |||
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | + + | assert( p1==p2 ); rc = queryTokenizer(db, "nosuchtokenizer", &p2); assert( rc==SQLITE_ERROR ); assert( p2==0 ); assert( 0==strcmp(sqlite3_errmsg(db), "unknown tokenizer: nosuchtokenizer") ); /* Test the storage function */ #ifdef SQLITE_ENABLE_FTS3_TOKENIZER rc = registerTokenizer(db, "nosuchtokenizer", p1); assert( rc==SQLITE_OK ); rc = queryTokenizer(db, "nosuchtokenizer", &p2); assert( rc==SQLITE_OK ); assert( p2==p1 ); #endif sqlite3_result_text(context, "ok", -1, SQLITE_STATIC); } #endif /* |
︙ |
Changes to ext/fts5/fts5Int.h.
︙ | |||
278 279 280 281 282 283 284 285 286 287 288 289 290 291 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | + | int sqlite3Fts5PoslistReaderNext(Fts5PoslistReader*); typedef struct Fts5PoslistWriter Fts5PoslistWriter; struct Fts5PoslistWriter { i64 iPrev; }; int sqlite3Fts5PoslistWriterAppend(Fts5Buffer*, Fts5PoslistWriter*, i64); void sqlite3Fts5PoslistSafeAppend(Fts5Buffer*, i64*, i64); int sqlite3Fts5PoslistNext64( const u8 *a, int n, /* Buffer containing poslist */ int *pi, /* IN/OUT: Offset within a[] */ i64 *piOff /* IN/OUT: Current offset */ ); |
︙ |
Changes to ext/fts5/fts5_buffer.c.
︙ | |||
12 13 14 15 16 17 18 | 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 | + - - - - - - - - - - - - + + + + + + + + + + + + + | */ #include "fts5Int.h" int sqlite3Fts5BufferSize(int *pRc, Fts5Buffer *pBuf, u32 nByte){ if( (u32)pBuf->nSpace<nByte ){ |
︙ | |||
203 204 205 206 207 208 209 210 211 212 213 214 215 | 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 | + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - + - - + | ){ memset(pIter, 0, sizeof(*pIter)); pIter->a = a; pIter->n = n; sqlite3Fts5PoslistReaderNext(pIter); return pIter->bEof; } /* ** Append position iPos to the position list being accumulated in buffer ** pBuf, which must be already be large enough to hold the new data. ** The previous position written to this list is *piPrev. *piPrev is set ** to iPos before returning. */ void sqlite3Fts5PoslistSafeAppend( Fts5Buffer *pBuf, i64 *piPrev, i64 iPos ){ static const i64 colmask = ((i64)(0x7FFFFFFF)) << 32; if( (iPos & colmask) != (*piPrev & colmask) ){ pBuf->p[pBuf->n++] = 1; pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], (iPos>>32)); *piPrev = (iPos & colmask); } pBuf->n += sqlite3Fts5PutVarint(&pBuf->p[pBuf->n], (iPos-*piPrev)+2); *piPrev = iPos; } int sqlite3Fts5PoslistWriterAppend( Fts5Buffer *pBuf, Fts5PoslistWriter *pWriter, i64 iPos ){ |
︙ |
Changes to ext/fts5/fts5_index.c.
︙ | |||
514 515 516 517 518 519 520 | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | - | /* Invoked to set output variables. */ void (*xSetOutputs)(Fts5Iter*, Fts5SegIter*); int nSeg; /* Size of aSeg[] array */ int bRev; /* True to iterate in reverse order */ u8 bSkipEmpty; /* True to skip deleted entries */ |
︙ | |||
2026 2027 2028 2029 2030 2031 2032 | 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 | - - - | int iPoslist; if( pIter->iTermLeafPgno==pIter->iLeafPgno ){ iPoslist = pIter->iTermLeafOffset; }else{ iPoslist = 4; } fts5IndexSkipVarint(pLeaf->p, iPoslist); |
︙ | |||
3091 3092 3093 3094 3095 3096 3097 | 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 | - + | ** column filters are specified. */ static void fts5IterSetOutputs_Nocolset(Fts5Iter *pIter, Fts5SegIter *pSeg){ pIter->base.iRowid = pSeg->iRowid; pIter->base.nData = pSeg->nPos; assert( pIter->pIndex->pConfig->eDetail!=FTS5_DETAIL_NONE ); |
︙ | |||
3208 3209 3210 3211 3212 3213 3214 | 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 | - + | static void fts5IterSetOutputCb(int *pRc, Fts5Iter *pIter){ if( *pRc==SQLITE_OK ){ Fts5Config *pConfig = pIter->pIndex->pConfig; if( pConfig->eDetail==FTS5_DETAIL_NONE ){ pIter->xSetOutputs = fts5IterSetOutputs_None; } |
︙ | |||
3355 3356 3357 3358 3359 3360 3361 | 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 | - | Fts5Iter **ppOut /* New object */ ){ Fts5Iter *pNew; pNew = fts5MultiIterAlloc(p, 2); if( pNew ){ Fts5SegIter *pIter = &pNew->aSeg[1]; |
︙ | |||
4701 4702 4703 4704 4705 4706 4707 | 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 | - - - - - - - - + + + + + - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + + - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + - | */ static void fts5MergePrefixLists( Fts5Index *p, /* FTS5 backend object */ Fts5Buffer *p1, /* First list to merge */ Fts5Buffer *p2 /* Second list to merge */ ){ if( p2->n ){ |
︙ | |||
4932 4933 4934 4935 4936 4937 4938 | 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 | - + | ** to the database. Additionally, assume that the contents of the %_data ** table may have changed on disk. So any in-memory caches of %_data ** records must be invalidated. */ int sqlite3Fts5IndexRollback(Fts5Index *p){ fts5CloseReader(p); fts5IndexDiscardData(p); |
︙ | |||
5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 | 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 | + - + | fts5StructureRelease(pStruct); } }else{ /* Scan multiple terms in the main index */ int bDesc = (flags & FTS5INDEX_QUERY_DESC)!=0; buf.p[0] = FTS5_MAIN_PREFIX; fts5SetupPrefixIter(p, bDesc, buf.p, nToken+1, pColset, &pRet); assert( pRet->pColset==0 ); fts5IterSetOutputCb(&p->rc, pRet); if( p->rc==SQLITE_OK ){ Fts5SegIter *pSeg = &pRet->aSeg[pRet->aFirst[1].iFirst]; |
︙ |
Changes to ext/fts5/fts5_main.c.
︙ | |||
799 800 801 802 803 804 805 | 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 | - + + | ** ** Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned ** even if we reach end-of-file. The fts5EofMethod() will be called ** subsequently to determine whether or not an EOF was hit. */ static int fts5NextMethod(sqlite3_vtab_cursor *pCursor){ Fts5Cursor *pCsr = (Fts5Cursor*)pCursor; |
︙ |
Changes to ext/fts5/fts5_varint.c.
︙ | |||
329 330 331 332 333 334 335 336 337 338 339 340 341 342 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | + + + | return 2; } return fts5PutVarint64(p,v); } int sqlite3Fts5GetVarintLen(u32 iVal){ #if 0 if( iVal<(1 << 7 ) ) return 1; #endif assert( iVal>=(1 << 7) ); if( iVal<(1 << 14) ) return 2; if( iVal<(1 << 21) ) return 3; if( iVal<(1 << 28) ) return 4; return 5; } |
Changes to ext/fts5/test/fts5ad.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + + | # 2014 June 17 # # 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 script is testing the FTS5 module. # # More specifically, the focus is on testing prefix queries, both with and # without prefix indexes. # source [file join [file dirname [info script]] fts5_common.tcl] set testprefix fts5ad # If SQLITE_ENABLE_FTS5 is defined, omit this file. ifcapable !fts5 { |
︙ |
Changes to ext/fts5/test/fts5config.test.
︙ | |||
239 240 241 242 243 244 245 246 247 | 239 240 241 242 243 244 245 246 247 248 249 250 251 | + + + + | 5 {detail=',1'} 6 {detail=''} } { set res [list 1 {malformed detail=... directive}] do_catchsql_test 11.$tn "CREATE VIRTUAL TABLE f1 USING fts5(x, $opt)" $res } do_catchsql_test 12.1 { INSERT INTO t1(t1, rank) VALUES('rank', NULL);; } {1 {SQL logic error or missing database}} finish_test |
Changes to ext/fts5/test/fts5detail.test.
︙ | |||
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + + + + | do_execsql_test 2.1 { INSERT INTO t2(t2) VALUES('integrity-check'); } do_execsql_test 2.2 { SELECT fts5_test_poslist(t2) FROM t2('aa'); } {0.0.0} do_execsql_test 2.3 { SELECT fts5_test_collist(t2) FROM t2('aa'); } {0.0} set ::pc 0 #puts [nearset {{ax bx cx}} -pc ::pc -near 10 -- b*] #exit #------------------------------------------------------------------------- # Check that the xInstCount, xInst, xPhraseFirst and xPhraseNext APIs |
︙ |
Changes to main.mk.
︙ | |||
462 463 464 465 466 467 468 469 470 471 472 473 474 475 | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | + + + + + + | sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) $(SHELL_OPT) \ $(TOP)/src/shell.c libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) sqldiff$(EXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h $(TCCX) -o sqldiff$(EXE) -DSQLITE_THREADSAFE=0 \ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) $(THREADLIB) srcck1$(EXE): $(TOP)/tool/srcck1.c $(BCC) -o srcck1$(EXE) $(TOP)/tool/srcck1.c sourcetest: srcck1$(EXE) sqlite3.c ./srcck1 sqlite3.c fuzzershell$(EXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h $(TCCX) -o fuzzershell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ $(FUZZERSHELL_OPT) $(TOP)/tool/fuzzershell.c sqlite3.c \ $(TLIBS) $(THREADLIB) fuzzcheck$(EXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h |
︙ | |||
751 752 753 754 755 756 757 | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | - + | # quicktest: ./testfixture$(EXE) ./testfixture$(EXE) $(TOP)/test/extraquick.test $(TESTOPTS) # The default test case. Runs most of the faster standard TCL tests, # and fuzz tests, and sqlite3_analyzer and sqldiff tests. # |
︙ | |||
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 | 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 | + | rm -f showdb showdb.exe rm -f showjournal showjournal.exe rm -f showstat4 showstat4.exe rm -f showwal showwal.exe rm -f speedtest1 speedtest1.exe rm -f wordcount wordcount.exe rm -f rbu rbu.exe rm -f srcck1 srcck1.exe rm -f sqlite3.c sqlite3-*.c fts?amal.c tclsqlite3.c rm -f sqlite3rc.h rm -f shell.c sqlite3ext.h rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c rm -f sqlite-*-output.vsix rm -f mptester mptester.exe rm -f fuzzershell fuzzershell.exe rm -f fuzzcheck fuzzcheck.exe rm -f sqldiff sqldiff.exe rm -f fts5.* fts5parse.* |
Changes to src/alter.c.
︙ | |||
691 692 693 694 695 696 697 | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | - + | */ if( pDflt ){ sqlite3_value *pVal = 0; int rc; rc = sqlite3ValueFromExpr(db, pDflt, SQLITE_UTF8, SQLITE_AFF_BLOB, &pVal); assert( rc==SQLITE_OK || rc==SQLITE_NOMEM ); if( rc!=SQLITE_OK ){ |
︙ |
Changes to src/btree.c.
︙ | |||
6171 6172 6173 6174 6175 6176 6177 | 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 | - + | ** Use a call to btreeParseCellPtr() to verify that the values above ** were computed correctly. */ #if SQLITE_DEBUG { CellInfo info; pPage->xParseCell(pPage, pCell, &info); |
︙ | |||
7830 7831 7832 7833 7834 7835 7836 | 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 | - - + + + - + | */ static int balance(BtCursor *pCur){ int rc = SQLITE_OK; const int nMin = pCur->pBt->usableSize * 2 / 3; u8 aBalanceQuickSpace[13]; u8 *pFree = 0; |
︙ | |||
7883 7884 7885 7886 7887 7888 7889 | 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 | + - + | ** buffer. ** ** The purpose of the following assert() is to check that only a ** single call to balance_quick() is made for each call to this ** function. If this were not verified, a subtle bug involving reuse ** of the aBalanceQuickSpace[] might sneak in. */ assert( balance_quick_called==0 ); |
︙ | |||
9350 9351 9352 9353 9354 9355 9356 | 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 | - + + | BtShared *pBt = p->pBt; int savedDbFlags = pBt->db->flags; char zErr[100]; VVA_ONLY( int nRef ); sqlite3BtreeEnter(p); assert( p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE ); |
︙ |
Changes to src/build.c.
︙ | |||
1950 1951 1952 1953 1954 1955 1956 | 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 | - + | sqlite3VdbeAddOp3(v, OP_OpenWrite, 1, pParse->regRoot, iDb); sqlite3VdbeChangeP5(v, OPFLAG_P2ISREG); pParse->nTab = 2; addrTop = sqlite3VdbeCurrentAddr(v) + 1; sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, addrTop); sqlite3SelectDestInit(&dest, SRT_Coroutine, regYield); sqlite3Select(pParse, pSelect, &dest); |
︙ |
Changes to src/insert.c.
︙ | |||
681 682 683 684 685 686 687 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | - + | sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, addrTop); sqlite3SelectDestInit(&dest, SRT_Coroutine, regYield); dest.iSdst = bIdListInOrder ? regData : 0; dest.nSdst = pTab->nCol; rc = sqlite3Select(pParse, pSelect, &dest); regFromSelect = dest.iSdst; if( rc || db->mallocFailed || pParse->nErr ) goto insert_cleanup; |
︙ |
Changes to src/main.c.
︙ | |||
3690 3691 3692 3693 3694 3695 3696 | 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 | - + | ** assert() is disabled, then the return value is zero. If X is ** false and assert() is enabled, then the assertion fires and the ** process aborts. If X is false and assert() is disabled, then the ** return value is zero. */ case SQLITE_TESTCTRL_ASSERT: { volatile int x = 0; |
︙ |
Changes to src/malloc.c.
︙ | |||
622 623 624 625 626 627 628 629 630 631 | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 | + + - - + + + | void *p; if( db ) return sqlite3DbMallocRawNN(db, n); p = sqlite3Malloc(n); sqlite3MemdebugSetType(p, MEMTYPE_HEAP); return p; } void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){ #ifndef SQLITE_OMIT_LOOKASIDE LookasideSlot *pBuf; assert( db!=0 ); assert( sqlite3_mutex_held(db->mutex) ); assert( db->pnBytesFreed==0 ); |
︙ |
Changes to src/select.c.
︙ | |||
2948 2949 2950 2951 2952 2953 2954 | 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 | - + - + | */ addrSelectA = sqlite3VdbeCurrentAddr(v) + 1; addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA); VdbeComment((v, "left SELECT")); pPrior->iLimit = regLimitA; explainSetInteger(iSub1, pParse->iNextSelectId); sqlite3Select(pParse, pPrior, &destA); |
︙ | |||
4986 4987 4988 4989 4990 4991 4992 | 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 | - + | pItem->addrFillSub = addrTop; sqlite3SelectDestInit(&dest, SRT_Coroutine, pItem->regReturn); explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId); sqlite3Select(pParse, pSub, &dest); pItem->pTab->nRowLogEst = sqlite3LogEst(pSub->nSelectRow); pItem->fg.viaCoroutine = 1; pItem->regResult = dest.iSdst; |
︙ |
Changes to src/test_config.c.
︙ | |||
365 366 367 368 369 370 371 372 373 374 375 376 377 378 | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | + + + + + + | #endif #ifdef SQLITE_ENABLE_FTS3 Tcl_SetVar2(interp, "sqlite_options", "fts3", "1", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY); #endif #ifdef SQLITE_ENABLE_FTS3_TOKENIZER Tcl_SetVar2(interp, "sqlite_options", "fts3_tokenizer", "1", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "fts3_tokenizer", "0", TCL_GLOBAL_ONLY); #endif #ifdef SQLITE_ENABLE_FTS5 Tcl_SetVar2(interp, "sqlite_options", "fts5", "1", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "fts5", "0", TCL_GLOBAL_ONLY); #endif |
︙ |
Changes to src/tokenize.c.
︙ | |||
14 15 16 17 18 19 20 21 | 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + | ** This file contains C code that splits an SQL input string up into ** individual tokens and sends those tokens one-by-one over to the ** parser for analysis. */ #include "sqliteInt.h" #include <stdlib.h> /* Character classes for tokenizing ** ** In the sqlite3GetToken() function, a switch() on aiClass[c] is implemented ** using a lookup table, whereas a switch() directly on c uses a binary search. ** The lookup table is much faster. To maximize speed, and to ensure that ** a lookup table is used, all of the classes need to be small integers and ** all of them need to be used within the switch. */ #define CC_X 0 /* The letter 'x', or start of BLOB literal */ #define CC_KYWD 1 /* Alphabetics or '_'. Usable in a keyword */ #define CC_ID 2 /* unicode characters usable in IDs */ #define CC_DIGIT 3 /* Digits */ #define CC_DOLLAR 4 /* '$' */ #define CC_VARALPHA 5 /* '@', '#', ':'. Alphabetic SQL variables */ #define CC_VARNUM 6 /* '?'. Numeric SQL variables */ #define CC_SPACE 7 /* Space characters */ #define CC_QUOTE 8 /* '"', '\'', or '`'. String literals, quoted ids */ #define CC_QUOTE2 9 /* '['. [...] style quoted ids */ #define CC_PIPE 10 /* '|'. Bitwise OR or concatenate */ #define CC_MINUS 11 /* '-'. Minus or SQL-style comment */ #define CC_LT 12 /* '<'. Part of < or <= or <> */ #define CC_GT 13 /* '>'. Part of > or >= */ #define CC_EQ 14 /* '='. Part of = or == */ #define CC_BANG 15 /* '!'. Part of != */ #define CC_SLASH 16 /* '/'. / or c-style comment */ #define CC_LP 17 /* '(' */ #define CC_RP 18 /* ')' */ #define CC_SEMI 19 /* ';' */ #define CC_PLUS 20 /* '+' */ #define CC_STAR 21 /* '*' */ #define CC_PERCENT 22 /* '%' */ #define CC_COMMA 23 /* ',' */ #define CC_AND 24 /* '&' */ #define CC_TILDA 25 /* '~' */ #define CC_DOT 26 /* '.' */ #define CC_ILLEGAL 27 /* Illegal character */ static const unsigned char aiClass[] = { #ifdef SQLITE_ASCII /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */ /* 0x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 7, 7, 27, 7, 7, 27, 27, /* 1x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, /* 2x */ 7, 15, 8, 5, 4, 22, 24, 8, 17, 18, 21, 20, 23, 11, 26, 16, /* 3x */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 19, 12, 14, 13, 6, /* 4x */ 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 5x */ 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 9, 27, 27, 27, 1, /* 6x */ 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 7x */ 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 27, 10, 27, 25, 27, /* 8x */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 9x */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* Ax */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* Bx */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* Cx */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* Dx */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* Ex */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* Fx */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 #endif #ifdef SQLITE_EBCDIC /* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */ /* 0x */ 27, 27, 27, 27, 27, 7, 27, 27, 27, 27, 27, 27, 7, 7, 27, 27, /* 1x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, /* 2x */ 27, 27, 27, 27, 27, 7, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, /* 3x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, /* 4x */ 7, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 12, 17, 20, 10, /* 5x */ 24, 27, 27, 27, 27, 27, 27, 27, 27, 27, 15, 4, 21, 18, 19, 27, /* 6x */ 11, 16, 27, 27, 27, 27, 27, 27, 27, 27, 27, 23, 22, 1, 13, 7, /* 7x */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 8, 5, 5, 5, 8, 14, 8, /* 8x */ 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27, /* 9x */ 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27, /* 9x */ 25, 1, 1, 1, 1, 1, 1, 0, 1, 1, 27, 27, 27, 27, 27, 27, /* Bx */ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 9, 27, 27, 27, 27, 27, /* Cx */ 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27, /* Dx */ 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27, /* Ex */ 27, 27, 1, 1, 1, 1, 1, 0, 1, 1, 27, 27, 27, 27, 27, 27, /* Fx */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27, 27, 27, 27, 27, 27, #endif }; /* |
︙ | |||
53 54 55 56 57 58 59 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + | /* ** The sqlite3KeywordCode function looks up an identifier to determine if ** it is a keyword. If it is a keyword, the token code of that keyword is ** returned. If the input is not a keyword, TK_ID is returned. ** ** The implementation of this routine was generated by a program, |
︙ | |||
106 107 108 109 110 111 112 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 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 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 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 | - + - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - | /* Make the IdChar function accessible from ctime.c */ #ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS int sqlite3IsIdChar(u8 c){ return IdChar(c); } #endif /* |
︙ | |||
253 254 255 256 257 258 259 | 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 | - + - + - | *tokenType = TK_ID; return i+1; }else{ *tokenType = TK_ILLEGAL; return i; } } |
︙ | |||
300 301 302 303 304 305 306 | 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | - + - + - - + - - - + - | #endif while( IdChar(z[i]) ){ *tokenType = TK_ILLEGAL; i++; } return i; } |
︙ | |||
344 345 346 347 348 349 350 351 | 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 | + + + + + + + + + + + + - + - + + - + - - - + + + - - - + + + + - - + + | }else{ break; } } if( n==0 ) *tokenType = TK_ILLEGAL; return i; } case CC_KYWD: { for(i=1; aiClass[z[i]]<=CC_KYWD; i++){} if( IdChar(z[i]) ){ /* This token started out using characters that can appear in keywords, ** but z[i] is a character not allowed within keywords, so this must ** be an identifier instead */ i++; break; } *tokenType = TK_ID; return keywordCode((char*)z, i, tokenType); } #ifndef SQLITE_OMIT_BLOB_LITERAL |
︙ |
Changes to src/vdbe.h.
︙ | |||
176 177 178 179 180 181 182 183 184 185 186 187 188 189 | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | + | int sqlite3VdbeGoto(Vdbe*,int); int sqlite3VdbeLoadString(Vdbe*,int,const char*); void sqlite3VdbeMultiLoad(Vdbe*,int,const char*,...); int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int); int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int); int sqlite3VdbeAddOp4Dup8(Vdbe*,int,int,int,int,const u8*,int); int sqlite3VdbeAddOp4Int(Vdbe*,int,int,int,int,int); void sqlite3VdbeEndCoroutine(Vdbe*,int); #if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS) void sqlite3VdbeVerifyNoMallocRequired(Vdbe *p, int N); #else # define sqlite3VdbeVerifyNoMallocRequired(A,B) #endif VdbeOp *sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp, int iLineno); void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*); |
︙ |
Changes to src/vdbeaux.c.
︙ | |||
319 320 321 322 323 324 325 326 327 328 329 330 331 332 | 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 | + + + + + + + + + + + + + + + | int p3, /* The P3 operand */ int p4 /* The P4 operand as an integer */ ){ int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3); sqlite3VdbeChangeP4(p, addr, SQLITE_INT_TO_PTR(p4), P4_INT32); return addr; } /* Insert the end of a co-routine */ void sqlite3VdbeEndCoroutine(Vdbe *v, int regYield){ sqlite3VdbeAddOp1(v, OP_EndCoroutine, regYield); /* Clear the temporary register cache, thereby ensuring that each ** co-routine has its own independent set of registers, because co-routines ** might expect their registers to be preserved across an OP_Yield, and ** that could cause problems if two or more co-routines are using the same ** temporary register. */ v->pParse->nTempReg = 0; v->pParse->nRangeReg = 0; } /* ** Create a new symbolic label for an instruction that has yet to be ** coded. The symbolic label is really just a negative number. The ** label can be used as the P2 value of an operation. Later, when ** the label is resolved to a specific address, the VDBE will scan ** through its operation list and change all values of P2 which match |
︙ |
Changes to test/analyze9.test.
︙ | |||
1240 1241 1242 1243 1244 1245 1246 | 1240 1241 1242 1243 1244 1245 1246 | - - - | SELECT * FROM t1 WHERE x='B' AND y>25 AND z=?; } { 0 0 0 {SEARCH TABLE t1 USING INDEX i1 (x=? AND y>?)} } finish_test |
Changes to test/analyzeB.test.
︙ | |||
676 677 678 679 680 681 682 | 676 677 678 679 680 681 682 | - | set val $i do_execsql_test 20.3.$i { SELECT count(*) FROM sqlite_stat3 WHERE sample=$val } {1} } finish_test |
Changes to test/analyzeD.test.
︙ | |||
110 111 112 113 114 115 116 | 110 111 112 113 114 115 116 | - | do_eqp_test 1.8 { SELECT * FROM t1 WHERE a=13 AND c=150; } { 0 0 0 {SEARCH TABLE t1 USING INDEX t1_c (c=?)} } finish_test |
Changes to test/cacheflush.test.
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 | - | SELECT a FROM ta; SELECT b FROM tb; } } {a b} test_restore_config_pagecache finish_test |
Changes to test/cffault.test.
︙ | |||
152 153 154 155 156 157 158 | 152 153 154 155 156 157 158 | - | } -test { faultsim_test_result {0 {1 1 3 3 5 5 7 7 9 9}} {1 {disk I/O error}} catchsql ROLLBACK faultsim_integrity_check } finish_test |
Changes to test/corruptH.test.
︙ | |||
170 171 172 173 174 175 176 | 170 171 172 173 174 175 176 | - | DELETE FROM t2 WHERE c=1; } } } msg] $msg } {1 {database disk image is malformed}} finish_test |
Changes to test/corruptI.test.
︙ | |||
202 203 204 205 206 207 208 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - | INSERT INTO t1 VALUES(zeroblob(300)); INSERT INTO t1 VALUES(zeroblob(600)); } {} do_test 6.1 { db close hexio_write test.db 616 8FFFFFFF7F02 sqlite3 db test.db |
︙ |
Changes to test/cost.test.
︙ | |||
283 284 285 286 287 288 289 | 283 284 285 286 287 288 289 | - - - | SELECT rowid FROM t6 WHERE likelihood(a=0, 0.1) AND b='xyz' AND c=0 } { 0 0 0 {SEARCH TABLE t6 USING INDEX t6i1 (a=? AND b=?)} } } finish_test |
Changes to test/e_blobbytes.test.
︙ | |||
68 69 70 71 72 73 74 | 68 69 70 71 72 73 74 | - - | do_test 2.1 { sqlite3_blob_open db main q1 s 86 1 B list [catch { sqlite3_blob_write $B 86 "1" 1 } msg] $msg } {1 SQLITE_ERROR} sqlite3_blob_close $B finish_test |
Changes to test/e_blobclose.test.
︙ | |||
164 165 166 167 168 169 170 | 164 165 166 167 168 169 170 | - | # EVIDENCE-OF: R-25894-51060 Calling this routine with a null pointer # (such as would be returned by a failed call to sqlite3_blob_open()) is # a harmless no-op. # do_test 4.0 { sqlite3_blob_close 0 } {} finish_test |
Changes to test/e_blobopen.test.
︙ | |||
542 543 544 545 546 547 548 | 542 543 544 545 546 547 548 | - | } [list \ [string repeat [binary format c 1] 24] \ [string repeat [binary format c 1] 45] \ ] finish_test |
Changes to test/e_blobwrite.test.
︙ | |||
197 198 199 200 201 202 203 | 197 198 199 200 201 202 203 | - | } { 2 xyz ........................................ } finish_test |
Changes to test/e_walckpt.test.
︙ | |||
747 748 749 750 751 752 753 | 747 748 749 750 751 752 753 | - | db2 eval COMMIT wal_checkpoint_v2 db truncate } {0 0 0} finish_test |
Changes to test/fkey8.test.
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 | - | sqlite3_finalize $stmt set ret } $use_stmt } finish_test |
Changes to test/fordelete.test.
︙ | |||
203 204 205 206 207 208 209 | 203 204 205 206 207 208 209 | - | } {1 2} do_execsql_test 5.3 { DELETE FROM t1 WHERE a = 2; } {} finish_test |
Changes to test/fts3atoken.test.
︙ | |||
20 21 22 23 24 25 26 | 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 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 | - + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - - + + - - + + - + - - - + + + - + + - - - - - - + + + + + + + | # If SQLITE_ENABLE_FTS3 is defined, omit this file. ifcapable !fts3 { finish_test return } |
Changes to test/fts3conf.test.
︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 | - | } do_execsql_test 4.2.2 { SELECT * FROM t01 WHERE t01 MATCH 'b'; INSERT INTO t01(t01) VALUES('integrity-check'); } {} finish_test |
Changes to test/fts3expr4.test.
︙ | |||
75 76 77 78 79 80 81 | 75 76 77 78 79 80 81 | - | do_simple_expr_test 3.8 { "abc"* } { PHRASE 3 0 abc } do_simple_expr_test 3.8 { "ab*c" } { PHRASE 3 0 ab+ c } do_icu_expr_test 3.9 { "ab*c" } { PHRASE 3 0 ab+ * c } do_icu_expr_test 3.10 { ab*c } { AND {PHRASE 3 0 ab+} {PHRASE 3 0 c}} finish_test |
Changes to test/fts3join.test.
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 | - - | do_execsql_test 2.4 { SELECT * FROM ft3, ft2 WHERE y MATCH x; } {abc abc} do_catchsql_test 2.5 { SELECT * FROM ft3, ft2 WHERE y MATCH x AND x MATCH y; } {1 {unable to use function MATCH in the requested context}} finish_test |
Changes to test/fts3matchinfo.test.
︙ | |||
520 521 522 523 524 525 526 | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | - | } lappend r2 $M } do_execsql_test 11.1.$tn.2 { SELECT rowid, mit(matchinfo(tt, 'b')) FROM tt WHERE tt MATCH $expr } $r2 |
︙ | |||
548 549 550 551 552 553 554 | 547 548 549 550 551 552 553 | - | do_execsql_test 12.1 { INSERT INTO tt (rowid, c4, c45) VALUES(1, 'abc', 'abc'); SELECT mit(matchinfo(tt, 'b')) FROM tt WHERE tt MATCH 'abc'; } [list [list [expr 1<<4] [expr 1<<(45-32)]]] set sqlite_fts3_enable_parentheses 0 finish_test |
Changes to test/fts3offsets.test.
︙ | |||
117 118 119 120 121 122 123 | 117 118 119 120 121 122 123 | - | 2 {(A) x x x x x x x x x x x B} 1 {(A) (B) (C)} } set sqlite_fts3_enable_parentheses 0 finish_test |
Changes to test/fts3snippet.test.
︙ | |||
555 556 557 558 559 560 561 | 555 556 557 558 559 560 561 | - | } {64} set sqlite_fts3_enable_parentheses 0 finish_test |
Changes to test/fts4check.test.
︙ | |||
206 207 208 209 210 211 212 | 206 207 208 209 210 211 212 | - | do_execsql_test 5.4 { CREATE VIRTUAL TABLE t5 USING fts4(a, prefix="1,2,3"); INSERT INTO t5(t5) VALUES('integrity-check'); } {} finish_test |
Changes to test/fts4content.test.
︙ | |||
632 633 634 635 636 637 638 | 632 633 634 635 636 637 638 | - | do_catchsql_test 11.1 { CREATE VIRTUAL TABLE x1 USING fts4(content=x1); } {1 {vtable constructor called recursively: x1}} finish_test |
Changes to test/fts4growth.test.
︙ | |||
430 431 432 433 434 435 436 | 430 431 432 433 434 435 436 | - | SELECT sum(length(block)) FROM x6_segments WHERE blockid BETWEEN 23695 AND 24147 } {633507} finish_test |
Changes to test/fts4growth2.test.
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 | - | } execsql { SELECT max(level) FROM x1_segdir } } {1} } finish_test |
Changes to test/fts4langid.test.
︙ | |||
354 355 356 357 358 359 360 | 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 383 384 385 386 387 388 389 390 391 392 | + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + | for {set i 0} {$i < 50} {incr i} { execsql { INSERT INTO t4(docid, content, lid) VALUES($i, 'The Quick Brown Fox', $i) } } } ifcapable fts3_tokenizer { |
︙ |
Changes to test/fts4noti.test.
︙ | |||
224 225 226 227 228 229 230 | 224 225 226 227 228 229 230 | - - - | SELECT count(*) FROM t2 WHERE t2 MATCH 'no'; SELECT count(*) FROM t2 WHERE t2 MATCH 'yes'; SELECT count(*) FROM t2 WHERE t2 MATCH 'yep'; } {0 1 1 0 1 1} finish_test |
Changes to test/fts4onepass.test.
︙ | |||
140 141 142 143 144 145 146 | 140 141 142 143 144 145 146 | - | INSERT INTO ft2(ft2) VALUES('integrity-check'); } } eval $tcl2 } finish_test |
Changes to test/fuzz3.test.
︙ | |||
169 170 171 172 173 174 175 | 169 170 171 172 173 174 175 | - | do_test fuzz3-$ii.$iNew.[incr iTest] { db_checksum } $::cksum } test_restore_config_pagecache finish_test |
Changes to test/incrcorrupt.test.
︙ | |||
120 121 122 123 124 125 126 | 120 121 122 123 124 125 126 | - | do_test 2.14 { sqlite3_errmsg db } {not an error} do_test 2.15 { sqlite3_finalize $stmt } {SQLITE_CORRUPT} do_test 2.16 { sqlite3_errcode db } {SQLITE_CORRUPT} do_test 2.17 { sqlite3_errmsg db } {database disk image is malformed} finish_test |
Changes to test/mallocK.test.
︙ | |||
168 169 170 171 172 173 174 | 168 169 170 171 172 173 174 | - | execsql { SELECT * FROM x2 WHERE x = str('19') AND y = str('4') } } -test { faultsim_test_result [list 0 {}] } finish_test |
Changes to test/mallocL.test.
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 | - | } -test { faultsim_test_result [list 0 [lrange $::vals 0 $::j]] } } finish_test |
Changes to test/ovfl.test.
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 | - - | } {} do_execsql_test 1.2 { SELECT sum(length(c2)) FROM t1; } [expr 2000 * 2000] finish_test |
Changes to test/pragma2.test.
︙ | |||
251 252 253 254 255 256 257 | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | - | UPDATE t2 SET c=c-1; PRAGMA lock_status; } {main unlocked temp unknown aux1 exclusive} db close forcedelete test.db sqlite3 db test.db |
︙ |
Changes to test/quota.test.
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + | ifcapable !curdir { finish_test return } source $testdir/malloc_common.tcl forcedelete bak.db unset -nocomplain defaultVfs set defaultVfs [file_control_vfsname db] db close do_test quota-1.1 { sqlite3_quota_initialize nosuchvfs 1 } {SQLITE_ERROR} do_test quota-1.2 { sqlite3_quota_initialize "" 1 } {SQLITE_OK} do_test quota-1.3 { sqlite3_quota_initialize "" 1 } {SQLITE_MISUSE} |
︙ |
Changes to test/rollback2.test.
︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 | - | } -select { SELECT i FROM t1 WHERE (i%2)==0 ORDER BY h ASC; } -result { 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 } finish_test |
Changes to test/rollbackfault.test.
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 | - - | error "statements don't look right" } } } finish_test |
Changes to test/select4.test.
︙ | |||
911 912 913 914 915 916 917 918 919 | 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | + + + + + + + + + + + + + + + + + + + + | } {123 456} do_execsql_test select4-14.16 { VALUES(1),(2),(3),(4) UNION ALL SELECT 5 LIMIT 99; } {1 2 3 4 5} do_execsql_test select4-14.17 { VALUES(1),(2),(3),(4) UNION ALL SELECT 5 LIMIT 3; } {1 2 3} # Ticket https://www.sqlite.org/src/info/d06a25c84454a372 # Incorrect answer due to two co-routines using the same registers and expecting # those register values to be preserved across a Yield. # do_execsql_test select4-15.1 { DROP TABLE IF EXISTS tx; CREATE TABLE tx(id INTEGER PRIMARY KEY, a, b); INSERT INTO tx(a,b) VALUES(33,456); INSERT INTO tx(a,b) VALUES(33,789); SELECT DISTINCT t0.id, t0.a, t0.b FROM tx AS t0, tx AS t1 WHERE t0.a=t1.a AND t1.a=33 AND t0.b=456 UNION SELECT DISTINCT t0.id, t0.a, t0.b FROM tx AS t0, tx AS t1 WHERE t0.a=t1.a AND t1.a=33 AND t0.b=789 ORDER BY 1; } {1 33 456 2 33 789} finish_test |
Changes to test/select7.test.
︙ | |||
216 217 218 219 220 221 222 | 216 217 218 219 220 221 222 | - - | do_catchsql_test 8.2 { CREATE VIEW v0 as SELECT x, y FROM t01 UNION SELECT x FROM t02; EXPLAIN QUERY PLAN SELECT * FROM v0 WHERE x='0' OR y; } {1 {SELECTs to the left and right of UNION do not have the same number of result columns}} finish_test |
Changes to test/shared3.test.
︙ | |||
135 136 137 138 139 140 141 | 135 136 137 138 139 140 141 | - | } {1} do_test 3.5 { execsql { COMMIT } } {} sqlite3_enable_shared_cache $::enable_shared_cache finish_test |
Changes to test/snapshot.test.
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - | # block of tests above. # do_execsql_test 2.1.0 { BEGIN; SELECT * FROM t1; } {1 2 3 4 5 6 7 8} |
︙ |
Changes to test/sort3.test.
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 | - | 440000 440000000 440000 440000000 440000 440000000 440000 440000000 } finish_test |
Changes to test/sort5.test.
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 | - | do_execsql_test 1.2 { CREATE INDEX i1 ON t1(b); } db close tvfs delete finish_test |
Changes to test/spellfix.test.
︙ | |||
399 400 401 402 403 404 405 | 399 400 401 402 403 404 405 | - | do_catchsql_test 7.5.2.$tn.1 $sql $err do_execsql_test 7.5.2.$tn.2 { SELECT rowid, word FROM t4 } $res do_test 7.5.2.$tn.3 { sqlite3_get_autocommit db } $bRollback catchsql ROLLBACK } finish_test |
Changes to test/sqllog.test.
︙ | |||
106 107 108 109 110 111 112 | 106 107 108 109 110 111 112 113 | - - - | catch { db close } sqlite3_shutdown unset ::env(SQLITE_SQLLOG_DIR) unset ::env(SQLITE_SQLLOG_CONDITIONAL) sqlite3_config_sqllog sqlite3_initialize |
Changes to test/tkt-9f2eb3abac.test.
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 | - | } -body { execsql { SELECT * FROM t1,t2 WHERE a=? AND b=? AND c=? AND d=? AND e=? } } -test { faultsim_test_result {0 {}} } finish_test |
Changes to test/tkt-ba7cbfaedc.test.
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 | - - | select * from t1 group by id order by id asc; select * from t1 group by id order by id desc; } { 1 2 3 4 5 1 2 3 4 5 5 4 3 2 1 } finish_test |
Changes to test/triggerE.test.
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 | - - | INSERT INTO t2 VALUES(NULL, 'z'); INSERT INTO t3 VALUES(1, 2); SELECT * FROM t3; SELECT * FROM t2; } {1 2 x y z z} finish_test |
Changes to test/vtab_shared.test.
︙ | |||
272 273 274 275 276 277 278 | 272 273 274 275 276 277 278 | - | db close } {} db2 close } sqlite3_enable_shared_cache 0 finish_test |
Changes to test/wal6.test.
︙ | |||
234 235 236 237 238 239 240 | 234 235 236 237 238 239 240 | - | } {0 {1 2}} do_test 4.4.2 { catchsql { SELECT * FROM t2 } db2 } {1 {database disk image is malformed}} finish_test |
Changes to test/waloverwrite.test.
︙ | |||
127 128 129 130 131 132 133 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - | execsql {SAVEPOINT abc} for {set i 0} {$i < 5} {incr i} { foreach x [db eval {SELECT x FROM t1}] { execsql { UPDATE t1 SET y = randomblob(797) WHERE x=$x } } } |
︙ | |||
157 158 159 160 161 162 163 | 156 157 158 159 160 161 162 | - | do_test 1.$tn.10 { execsql { PRAGMA integrity_check } db2 } ok db2 close } finish_test |
Changes to test/whereI.test.
︙ | |||
85 86 87 88 89 90 91 | 85 86 87 88 89 90 91 | - | SELECT c||'.'||b FROM t3 WHERE a='t' OR d='t' } { 2.1 2.2 1.2 } finish_test |
Changes to test/withM.test.
︙ | |||
68 69 70 71 72 73 74 | 68 69 70 71 72 73 74 | - - - | } } -test { faultsim_test_result {0 {1 1 2 4 3 9 4 16 5 25}} db close } finish_test |
Changes to tool/mkkeywordhash.c.
︙ | |||
273 274 275 276 277 278 279 | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + + + + | { "WHEN", "TK_WHEN", ALWAYS }, { "WHERE", "TK_WHERE", ALWAYS }, }; /* Number of keywords */ static int nKeyword = (sizeof(aKeywordTable)/sizeof(aKeywordTable[0])); |
︙ | |||
561 562 563 564 565 566 567 | 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | - + + - + - - - + + + + + + + + + + + - + - + - - + | if( j>=5 ){ printf("\n"); j = 0; } } printf("%s };\n", j==0 ? "" : "\n"); |
Added tool/srcck1.c.