Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Update this branch with latest trunk changes. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sorter-opt |
Files: | files | file ages | folders |
SHA1: |
60be9c1c1ad0d8250a99cadda820dff4 |
User & Date: | dan 2015-04-10 08:20:42.809 |
Context
2015-04-11
| ||
18:45 | Merge latest trunk changes with this branch. (Closed-Leaf check-in: cf7590f607 user: dan tags: sorter-opt) | |
2015-04-10
| ||
08:28 | Update this branch with the latest changes from sorter-opt. (Leaf check-in: 08c0b19b89 user: dan tags: insert-select-opt) | |
08:20 | Update this branch with latest trunk changes. (check-in: 60be9c1c1a user: dan tags: sorter-opt) | |
07:55 | Do not allow virtual table constructors to be called recursively. (check-in: 0a72726da2 user: dan tags: trunk) | |
2015-04-02
| ||
09:06 | Fix a problem in vdbesort.c to do with caching unpacked records. (check-in: 80a0053950 user: dan tags: sorter-opt) | |
Changes
Changes to Makefile.in.
︙ | |||
532 533 534 535 536 537 538 539 540 541 542 543 544 545 | 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 | + + + | -avoid-version sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h $(LTLINK) $(READLINE_FLAGS) \ -o $@ $(TOP)/src/shell.c libsqlite3.la \ $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)" sqldiff$(EXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) mptester$(EXE): sqlite3.c $(TOP)/mptest/mptest.c $(LTLINK) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \ $(TLIBS) -rpath "$(libdir)" MPTEST1=./mptester$(EXE) mptest.db $(TOP)/mptest/crash01.test --repeat 20 MPTEST2=./mptester$(EXE) mptest.db $(TOP)/mptest/multiwrite01.test --repeat 20 mptest: mptester$(EXE) |
︙ |
Changes to Makefile.msc.
︙ | |||
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 | + + + | libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS) sqlite3.exe: $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h $(LTLINK) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\src\shell.c \ /link /pdb:sqlite3sh.pdb $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) sqldiff.exe: $(TOP)\tool\sqldiff.c sqlite3.c sqlite3.h $(LTLINK) $(TOP)\tool\sqldiff.c sqlite3.c mptester.exe: $(TOP)\mptest\mptest.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h $(LTLINK) $(SHELL_COMPILE_OPTS) $(TOP)\mptest\mptest.c \ /link $(LTLINKOPTS) $(LTLIBPATHS) $(SHELL_LINK_OPTS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) MPTEST1 = mptester mptest.db $(TOP)/mptest/crash01.test --repeat 20 MPTEST2 = mptester mptest.db $(TOP)/mptest/multiwrite01.test --repeat 20 |
︙ |
Changes to ext/fts3/fts3.c.
︙ | |||
1015 1016 1017 1018 1019 1020 1021 | 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 | - + + + + + | */ static int fts3ContentColumns( sqlite3 *db, /* Database handle */ const char *zDb, /* Name of db (i.e. "main", "temp" etc.) */ const char *zTbl, /* Name of content table */ const char ***pazCol, /* OUT: Malloc'd array of column names */ int *pnCol, /* OUT: Size of array *pazCol */ |
︙ | |||
1277 1278 1279 1280 1281 1282 1283 | 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 | - + | sqlite3_free(zCompress); sqlite3_free(zUncompress); zCompress = 0; zUncompress = 0; if( nCol==0 ){ sqlite3_free((void*)aCol); aCol = 0; |
︙ | |||
2498 2499 2500 2501 2502 2503 2504 | 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 | - + - + + - + + + + + + - + + | ** ** If the docids in the input doclists are sorted in ascending order, ** parameter bDescDoclist should be false. If they are sorted in ascending ** order, it should be passed a non-zero value. ** ** The right-hand input doclist is overwritten by this function. */ |
︙ | |||
2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 | 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 | + + + + + + | }else{ fts3PoslistCopy(0, &p2); fts3GetDeltaVarint3(&p2, pEnd2, bDescDoclist, &i2); } } *pnRight = (int)(p - aOut); if( bDescDoclist ){ sqlite3_free(aRight); *paRight = aOut; } return SQLITE_OK; } /* ** Argument pList points to a position list nList bytes in size. This ** function checks to see if the position list contains any entries for ** a token in position 0 (of any column). If so, it writes argument iDelta ** to the output buffer pOut, followed by a position list consisting only |
︙ | |||
2670 2671 2672 2673 2674 2675 2676 | 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 | - - + + + + + + + + + + + + + + + + | Fts3Table *p, /* FTS table handle */ TermSelect *pTS, /* TermSelect object to merge into */ char *aDoclist, /* Pointer to doclist */ int nDoclist /* Size of aDoclist in bytes */ ){ if( pTS->aaOutput[0]==0 ){ /* If this is the first term selected, copy the doclist to the output |
︙ | |||
3927 3928 3929 3930 3931 3932 3933 3934 | 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 | + + - + + | /* ** Arguments pList/nList contain the doclist for token iToken of phrase p. ** It is merged into the main doclist stored in p->doclist.aAll/nAll. ** ** This function assumes that pList points to a buffer allocated using ** sqlite3_malloc(). This function takes responsibility for eventually ** freeing the buffer. ** ** SQLITE_OK is returned if successful, or SQLITE_NOMEM if an error occurs. */ |
︙ | |||
3973 3974 3975 3976 3977 3978 3979 | 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 | + - + + + | pRight = p->doclist.aAll; nRight = p->doclist.nAll; pLeft = pList; nLeft = nList; nDiff = p->iDoclistToken - iToken; } rc = fts3DoclistPhraseMerge( |
︙ | |||
4005 4006 4007 4008 4009 4010 4011 | 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 | - + | assert( pToken->pDeferred==0 || pToken->pSegcsr==0 ); if( pToken->pSegcsr ){ int nThis = 0; char *pThis = 0; rc = fts3TermSelect(pTab, pToken, p->iColumn, &nThis, &pThis); if( rc==SQLITE_OK ){ |
︙ | |||
4807 4808 4809 4810 4811 4812 4813 4814 4815 | 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 | + + + + + - | ** part of a multi-token phrase. Either way, the entire doclist will ** (eventually) be loaded into memory. It may as well be now. */ Fts3PhraseToken *pToken = pTC->pToken; int nList = 0; char *pList = 0; rc = fts3TermSelect(pTab, pToken, pTC->iCol, &nList, &pList); assert( rc==SQLITE_OK || pList==0 ); if( rc==SQLITE_OK ){ rc = fts3EvalPhraseMergeToken( pTab, pTC->pPhrase, pTC->iToken,pList,nList ); } if( rc==SQLITE_OK ){ int nCount; |
︙ |
Changes to main.mk.
︙ | |||
399 400 401 402 403 404 405 406 407 408 409 410 411 412 | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | + + + + | $(AR) libsqlite3.a $(LIBOBJ) $(RANLIB) libsqlite3.a sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \ $(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) mptester$(EXE): sqlite3.c $(TOP)/mptest/mptest.c $(TCCX) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \ $(TLIBS) $(THREADLIB) MPTEST1=./mptester$(EXE) mptest.db $(TOP)/mptest/crash01.test --repeat 20 MPTEST2=./mptester$(EXE) mptest.db $(TOP)/mptest/multiwrite01.test --repeat 20 |
︙ |
Changes to src/build.c.
︙ | |||
3773 3774 3775 3776 3777 3778 3779 | 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 | - | ** The operator is "natural cross join". The A and B operands are stored ** in p->a[0] and p->a[1], respectively. The parser initially stores the ** operator with A. This routine shifts that operator over to B. */ void sqlite3SrcListShiftJoinType(SrcList *p){ if( p ){ int i; |
︙ |
Changes to src/complete.c.
︙ | |||
265 266 267 268 269 270 271 | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | - + | ** This routine is the same as the sqlite3_complete() routine described ** above, except that the parameter is required to be UTF-16 encoded, not ** UTF-8. */ int sqlite3_complete16(const void *zSql){ sqlite3_value *pVal; char const *zSql8; |
︙ |
Changes to src/os_unix.c.
︙ | |||
3779 3780 3781 3782 3783 3784 3785 | 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 | - + | /* ** Information and control of an open file handle. */ static int unixFileControl(sqlite3_file *id, int op, void *pArg){ unixFile *pFile = (unixFile*)id; switch( op ){ case SQLITE_FCNTL_WAL_BLOCK: { |
︙ |
Changes to src/printf.c.
︙ | |||
257 258 259 260 261 262 263 | 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 | - + + - + + + + - + + + + - + + + | if( bArgList ){ width = (int)getIntArg(pArgList); }else{ width = va_arg(ap,int); } if( width<0 ){ flag_leftjustify = 1; |
︙ | |||
446 447 448 449 450 451 452 | 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | + - + | prefix = '-'; }else{ if( flag_plussign ) prefix = '+'; else if( flag_blanksign ) prefix = ' '; else prefix = 0; } if( xtype==etGENERIC && precision>0 ) precision--; testcase( precision>0xfff ); |
︙ | |||
501 502 503 504 505 506 507 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | - - + + + | flag_rtz = flag_altform2; } if( xtype==etEXP ){ e2 = 0; }else{ e2 = exp; } |
︙ | |||
734 735 736 737 738 739 740 | 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 | - + | ** able to accept at least N more bytes of text. ** ** Return the number of bytes of text that StrAccum is able to accept ** after the attempted enlargement. The value returned might be zero. */ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){ char *zNew; |
︙ | |||
783 784 785 786 787 788 789 | 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 | + - + + + | return N; } /* ** Append N copies of character c to the given string buffer. */ void sqlite3AppendChar(StrAccum *p, int N, char c){ testcase( p->nChar + (i64)N > 0x7fffffff ); |
︙ |
Changes to src/resolve.c.
︙ | |||
1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 | 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 | + + + + + + + + + + + + + + | */ memset(&sNC, 0, sizeof(sNC)); sNC.pParse = pParse; if( sqlite3ResolveExprNames(&sNC, p->pLimit) || sqlite3ResolveExprNames(&sNC, p->pOffset) ){ return WRC_Abort; } /* If the SF_Converted flags is set, then this Select object was ** was created by the convertCompoundSelectToSubquery() function. ** In this case the ORDER BY clause (p->pOrderBy) should be resolved ** as if it were part of the sub-query, not the parent. This block ** moves the pOrderBy down to the sub-query. It will be moved back ** after the names have been resolved. */ if( p->selFlags & SF_Converted ){ Select *pSub = p->pSrc->a[0].pSelect; assert( p->pSrc->nSrc==1 && isCompound==0 && p->pOrderBy ); assert( pSub->pPrior && pSub->pOrderBy==0 ); pSub->pOrderBy = p->pOrderBy; p->pOrderBy = 0; } /* Recursively resolve names in all subqueries */ for(i=0; i<p->pSrc->nSrc; i++){ struct SrcList_item *pItem = &p->pSrc->a[i]; if( pItem->pSelect ){ NameContext *pNC; /* Used to iterate name contexts */ |
︙ | |||
1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 | 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 | + + + + + + + + + + + | if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort; /* The ORDER BY and GROUP BY clauses may not refer to terms in ** outer queries */ sNC.pNext = 0; sNC.ncFlags |= NC_AllowAgg; /* If this is a converted compound query, move the ORDER BY clause from ** the sub-query back to the parent query. At this point each term ** within the ORDER BY clause has been transformed to an integer value. ** These integers will be replaced by copies of the corresponding result ** set expressions by the call to resolveOrderGroupBy() below. */ if( p->selFlags & SF_Converted ){ Select *pSub = p->pSrc->a[0].pSelect; p->pOrderBy = pSub->pOrderBy; pSub->pOrderBy = 0; } /* Process the ORDER BY clause for singleton SELECT statements. ** The ORDER BY clause for compounds SELECT statements is handled ** below, after all of the result-sets for all of the elements of ** the compound have been resolved. */ if( !isCompound && resolveOrderGroupBy(&sNC, p, p->pOrderBy, "ORDER") ){ |
︙ |
Changes to src/select.c.
︙ | |||
3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 | 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 | + + | p->pWhere = 0; pNew->pGroupBy = 0; pNew->pHaving = 0; pNew->pOrderBy = 0; p->pPrior = 0; p->pNext = 0; p->selFlags &= ~SF_Compound; assert( (p->selFlags & SF_Converted)==0 ); p->selFlags |= SF_Converted; assert( pNew->pPrior!=0 ); pNew->pPrior->pNext = pNew; pNew->pLimit = 0; pNew->pOffset = 0; return WRC_Continue; } |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 | 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 | + | #define SF_Compound 0x0040 /* Part of a compound query */ #define SF_Values 0x0080 /* Synthesized from VALUES clause */ #define SF_AllValues 0x0100 /* All terms of compound are VALUES */ #define SF_NestedFrom 0x0200 /* Part of a parenthesized FROM clause */ #define SF_MaybeConvert 0x0400 /* Need convertCompoundSelectToSubquery() */ #define SF_Recursive 0x0800 /* The recursive part of a recursive CTE */ #define SF_MinMaxAgg 0x1000 /* Aggregate containing min() or max() */ #define SF_Converted 0x2000 /* By convertCompoundSelectToSubquery() */ /* ** The results of a SELECT can be distributed in several ways, as defined ** by one of the following macros. The "SRT" prefix means "SELECT Result ** Type". ** |
︙ |
Changes to src/trigger.c.
︙ | |||
676 677 678 679 680 681 682 | 676 677 678 679 680 681 682 683 684 685 686 687 688 689 | - | ){ int iDb; /* Index of the database to use */ SrcList *pSrc; /* SrcList to be returned */ pSrc = sqlite3SrcListAppend(pParse->db, 0, &pStep->target, 0); if( pSrc ){ assert( pSrc->nSrc>0 ); |
︙ |
Changes to src/vtab.c.
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + | ** this struct allocated on the stack. It is used by the implementation of ** the sqlite3_declare_vtab() and sqlite3_vtab_config() APIs, both of which ** are invoked only from within xCreate and xConnect methods. */ struct VtabCtx { VTable *pVTable; /* The virtual table being constructed */ Table *pTab; /* The Table object to which the virtual table belongs */ VtabCtx *pPrior; /* Parent context (if any) */ int bDeclared; /* True after sqlite3_declare_vtab() is called */ }; /* ** The actual function that does the work of creating a new module. ** This function implements the sqlite3_create_module() and ** sqlite3_create_module_v2() interfaces. */ |
︙ | |||
483 484 485 486 487 488 489 | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | - + - + + + + + + + + + + + + + - + + - + + - + | static int vtabCallConstructor( sqlite3 *db, Table *pTab, Module *pMod, int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**), char **pzErr ){ |
︙ | |||
702 703 704 705 706 707 708 709 | 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | + - - + + | /* ** This function is used to set the schema of a virtual table. It is only ** valid to call this function from within the xCreate() or xConnect() of a ** virtual table module. */ int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ VtabCtx *pCtx = db->pVtabCtx; Parse *pParse; |
︙ | |||
741 742 743 744 745 746 747 | 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | - + | ){ if( !pTab->aCol ){ pTab->aCol = pParse->pNewTable->aCol; pTab->nCol = pParse->pNewTable->nCol; pParse->pNewTable->nCol = 0; pParse->pNewTable->aCol = 0; } |
︙ |
Changes to test/e_walauto.test.
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + + + + + + | # set testdir [file dirname $argv0] source $testdir/tester.tcl source $testdir/wal_common.tcl set testprefix e_walauto # Do not run this test on OpenBSD, as it depends on read() and mmap both # accessing the same coherent view of the "test.db-shm" file. This doesn't # work on OpenBSD. # if {$tcl_platform(os) == "OpenBSD"} { finish_test return } proc read_nbackfill {} { seek $::shmfd 96 binary scan [read $::shmfd 4] n nBackfill set nBackfill } proc read_mxframe {} { |
︙ |
Changes to test/fts3fault2.test.
︙ | |||
150 151 152 153 154 155 156 157 158 | 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 | + + + + + + + + + + + + + + + + + + + | ); } execsql { SELECT docid FROM ft WHERE ft MATCH 'th*' } } -test { faultsim_test_result {0 {1 2}} } } reset_db do_test 6.0 { execsql { CREATE VIRTUAL TABLE t6 USING fts4(x,order=DESC); INSERT INTO t6(docid, x) VALUES(-1,'a b'); INSERT INTO t6(docid, x) VALUES(1, 'b'); } faultsim_save_and_close } {} do_faultsim_test 6.1 -faults oom* -prep { faultsim_restore_and_reopen db eval {SELECT * FROM sqlite_master} } -body { execsql { SELECT docid FROM t6 WHERE t6 MATCH '"a* b"' } } -test { faultsim_test_result {0 -1} } finish_test |
Changes to test/fts3prefix.test.
︙ | |||
269 270 271 272 273 274 275 276 277 | 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 | + + + + + + + + + + + + + + + + + + | CREATE VIRTUAL TABLE t2 USING fts4(prefix=); INSERT INTO t1 VALUES('He dressed himself in cycling clothes'); INSERT INTO t2 VALUES('He dressed himself in cycling clothes'); } {} do_execsql_test 6.5.2 { SELECT md5sum(quote(root)) FROM t1_segdir; } [db eval {SELECT md5sum(quote(root)) FROM t2_segdir}] do_execsql_test 7.0 { CREATE VIRTUAL TABLE t6 USING fts4(x,order=DESC); INSERT INTO t6(docid, x) VALUES(-1,'a b'); INSERT INTO t6(docid, x) VALUES(1, 'b'); } do_execsql_test 7.1 { SELECT docid FROM t6 WHERE t6 MATCH '"a* b"'; } {-1} do_execsql_test 7.2 { SELECT docid FROM t6 WHERE t6 MATCH 'a*'; } {-1} do_execsql_test 7.3 { SELECT docid FROM t6 WHERE t6 MATCH 'a* b'; } {-1} finish_test |
Changes to test/fts4content.test.
︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | + + + | # SELECT statements. # # 8.* - Test that if the content=xxx and prefix options are used together, # the 'rebuild' command still works. # # 9.* - Test using content=xxx where xxx is a virtual table. # # 11.* - Test that circular references (e.g. "t1(content=t1)") are # detected. # do_execsql_test 1.1.1 { CREATE TABLE t1(a, b, c); INSERT INTO t1 VALUES('w x', 'x y', 'y z'); CREATE VIRTUAL TABLE ft1 USING fts4(content=t1); } |
︙ | |||
402 403 404 405 406 407 408 | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | - + | } #------------------------------------------------------------------------- # Test cases 6.* test # do_catchsql_test 6.1.1 { CREATE VIRTUAL TABLE ft7 USING fts4(content=t7); |
︙ | |||
429 430 431 432 433 434 435 | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | - + | SELECT name FROM sqlite_master WHERE name LIKE '%t7%' } { ft7 ft7_segments ft7_segdir sqlite_autoindex_ft7_segdir_1 ft7_docsize ft7_stat } do_catchsql_test 6.2.4 { SELECT * FROM ft7; |
︙ | |||
617 618 619 620 621 622 623 624 625 | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | + + + + + + + + + + + | do_execsql_test 10.6 { DELETE FROM ft WHERE docid=2 } do_execsql_test 10.7 { SELECT snippet(ft, '[', ']', '...', -1, 5) FROM ft WHERE ft MATCH 'e' } { {...c d [e] f g...} } #------------------------------------------------------------------------- # Test cases 11.* # reset_db do_catchsql_test 11.1 { CREATE VIRTUAL TABLE x1 USING fts4(content=x1); } {1 {vtable constructor called recursively: x1}} finish_test |
Changes to test/printf.test.
︙ | |||
468 469 470 471 472 473 474 475 476 477 478 479 480 481 | 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 | + + + + + + + + + + + + | sqlite3_mprintf_int {abc: (% 6d) (% 6x) (% 6o) :xyz}\ 0xff676981 0xff676981 0xff676981 } {abc: (-9999999) (ff676981) (37731664601) :xyz} do_test printf-1.16.7 { sqlite3_mprintf_int {abc: (%#6d) (%#6x) (%#6o) :xyz}\ 0xff676981 0xff676981 0xff676981 } {abc: (-9999999) (0xff676981) (037731664601) :xyz} do_test printf-1.17.1 { sqlite3_mprintf_int {abd: %2147483647d %2147483647x %2147483647o} 1 1 1 } {} do_test printf-1.17.2 { sqlite3_mprintf_int {abd: %*d %x} 2147483647 1 1 } {} do_test printf-1.17.3 { sqlite3_mprintf_int {abd: %*d %x} -2147483648 1 1 } {abd: 1 1} do_test printf-1.17.4 { sqlite3_mprintf_int {abd: %.2147483648d %x %x} 1 1 1 } {/.*/} do_test printf-2.1.1.1 { sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 0.001 } {abc: (0.0) :xyz} do_test printf-2.1.1.2 { sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 0.001 } {abc: (1.0e-03) :xyz} do_test printf-2.1.1.3 { |
︙ | |||
522 523 524 525 526 527 528 529 530 531 532 533 534 535 | 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | + + + | } {abc: 1 1 (0.0) :xyz} do_test printf-2.1.2.8 { sqlite3_mprintf_double {abc: %d %d (%1.1e) :xyz} 1 1 1.0e-20 } {abc: 1 1 (1.0e-20) :xyz} do_test printf-2.1.2.9 { sqlite3_mprintf_double {abc: %d %d (%1.1g) :xyz} 1 1 1.0e-20 } {abc: 1 1 (1e-20) :xyz} do_test printf-2.1.2.10 { sqlite3_mprintf_double {abc: %*.*f} 2000000000 1000000000 1.0e-20 } {abc: } do_test printf-2.1.3.1 { sqlite3_mprintf_double {abc: (%*.*f) :xyz} 1 1 1.0 } {abc: (1.0) :xyz} do_test printf-2.1.3.2 { sqlite3_mprintf_double {abc: (%*.*e) :xyz} 1 1 1.0 } {abc: (1.0e+00) :xyz} do_test printf-2.1.3.3 { |
︙ | |||
3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 | 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 | + + + + + + + + + | } [format {%d %d A String: (%s)} 1 2 {This is the string}] do_test printf-3.5 { sqlite3_mprintf_str {%d %d A String: (%30s)} 1 2 {This is the string} } [format {%d %d A String: (%30s)} 1 2 {This is the string}] do_test printf-3.6 { sqlite3_mprintf_str {%d %d A String: (%-30s)} 1 2 {This is the string} } [format {%d %d A String: (%-30s)} 1 2 {This is the string}] do_test printf-3.7 { sqlite3_mprintf_str {%d A String: (%*s)} 1 2147483647 {This is the string} } [] do_test printf-3.8 { sqlite3_mprintf_str {%d A String: (%*s)} 1 -2147483648 {This is the string} } {1 A String: (This is the string)} do_test printf-3.9 { sqlite3_mprintf_str {%d A String: (%.*s)} 1 -2147483648 {This is the string} } {1 A String: (This is the string)} do_test snprintf-3.11 { sqlite3_snprintf_str 2 {x%d %d %s} 10 10 {This is the string} } {x} do_test snprintf-3.12 { sqlite3_snprintf_str 3 {x%d %d %s} 10 10 {This is the string} } {x1} do_test snprintf-3.13 { |
︙ | |||
3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 | 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 | + + + | } {Inf} do_test printf-13.5 { sqlite3_mprintf_hexdouble %.20f fff0000000000000 } {-Inf} do_test printf-13.6 { sqlite3_mprintf_hexdouble %.20f fff8000000000000 } {NaN} do_test printf-13.7 { sqlite3_mprintf_hexdouble %2147483648.10000f 4693b8b5b5056e17 } {/100000000000000000000000000000000.00/} do_test printf-14.1 { sqlite3_mprintf_str {abc-%y-123} 0 0 {not used} } {abc-} do_test printf-14.2 { sqlite3_mprintf_n_test {xyzzy} } 5 |
︙ |
Changes to test/selectA.test.
︙ | |||
1370 1371 1372 1373 1374 1375 1376 1377 1378 | 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | do_execsql_test 4.2.2 { SELECT c, f(d,c,d,c,d) FROM t7 UNION ALL SELECT a, b FROM t6 ORDER BY 1,2 } {/2 . 3 . 4 . 5 . 6 . 7 ./} proc strip_rnd {explain} { regexp -all {sqlite_sq_[0123456789ABCDEF]*} $explain sqlite_sq } proc do_same_test {tn q1 args} { set r2 [strip_rnd [db eval "EXPLAIN $q1"]] set i 1 foreach q $args { set tst [subst -nocommands {strip_rnd [db eval "EXPLAIN $q"]}] uplevel do_test $tn.$i [list $tst] [list $r2] incr i } } do_execsql_test 5.0 { CREATE TABLE t8(a, b); CREATE TABLE t9(c, d); } {} do_same_test 5.1 { SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY a; } { SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY t8.a; } { SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY 1; } { SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY c; } { SELECT a, b FROM t8 INTERSECT SELECT c, d FROM t9 ORDER BY t9.c; } do_same_test 5.2 { SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY a COLLATE NOCASE } { SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY t8.a COLLATE NOCASE } { SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY 1 COLLATE NOCASE } { SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY c COLLATE NOCASE } { SELECT a, b FROM t8 UNION SELECT c, d FROM t9 ORDER BY t9.c COLLATE NOCASE } do_same_test 5.3 { SELECT a, b FROM t8 EXCEPT SELECT c, d FROM t9 ORDER BY b, c COLLATE NOCASE } { SELECT a, b FROM t8 EXCEPT SELECT c, d FROM t9 ORDER BY 2, 1 COLLATE NOCASE } { SELECT a, b FROM t8 EXCEPT SELECT c, d FROM t9 ORDER BY d, a COLLATE NOCASE } { SELECT a, b FROM t8 EXCEPT SELECT * FROM t9 ORDER BY t9.d, c COLLATE NOCASE } { SELECT * FROM t8 EXCEPT SELECT c, d FROM t9 ORDER BY d, t8.a COLLATE NOCASE } do_catchsql_test 5.4 { SELECT * FROM t8 UNION SELECT * FROM t9 ORDER BY a+b COLLATE NOCASE } {1 {1st ORDER BY term does not match any column in the result set}} finish_test |
Changes to test/walblock.test.
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + | # set testdir [file dirname $argv0] source $testdir/tester.tcl source $testdir/lock_common.tcl source $testdir/wal_common.tcl finish_test; return; # Feature currently not implemented. ifcapable !wal {finish_test ; return } if {$::tcl_platform(platform)!="unix"} { finish_test ; return } set testprefix walblock catch { db close } testvfs tvfs -fullshm 1 foreach f [glob test.db*] { forcedelete $f } |
︙ | |||
107 108 109 110 111 112 113 | 108 109 110 111 112 113 114 | - - - - | after 500 {set ::continue 1} vwait ::continue set ::out } {1 2 3 4 5 6 7 8 9 10} finish_test |
Added tool/showlocks.c.
|
Added tool/sqldiff.c.