Fossil SCM

Pull in the latest trunk changes and the latest NGQP-SQLite from upstream.

drh 2013-06-19 12:38 UTC sqlite-NGQP merge
Commit 03c5ec86159f85fcba42cc465edd95374fb2a5c0
--- .fossil-settings/ignore-glob
+++ .fossil-settings/ignore-glob
@@ -1,2 +1,4 @@
1
+compat/openssl-1.0.1e/*
2
+compat/tcl-8.6/*
13
fossil
24
fossil.exe
35
--- .fossil-settings/ignore-glob
+++ .fossil-settings/ignore-glob
@@ -1,2 +1,4 @@
 
 
1 fossil
2 fossil.exe
3
--- .fossil-settings/ignore-glob
+++ .fossil-settings/ignore-glob
@@ -1,2 +1,4 @@
1 compat/openssl-1.0.1e/*
2 compat/tcl-8.6/*
3 fossil
4 fossil.exe
5
+1 -6
--- src/main.c
+++ src/main.c
@@ -785,29 +785,24 @@
785785
fossil_print("This is fossil version " RELEASE_VERSION " "
786786
MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
787787
if(!find_option("verbose","v",0)){
788788
return;
789789
}else{
790
- int count = 0;
791790
fossil_print("Compiled on %s %s using %s (%d-bit)\n",
792791
__DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
793
- fossil_print("SQLite %s [%s],\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
792
+ fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
794793
fossil_print("zlib %s\n", ZLIB_VERSION);
795794
#if defined(FOSSIL_ENABLE_SSL)
796
- ++count;
797795
fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
798796
#endif
799797
#if defined(FOSSIL_ENABLE_TCL)
800
- ++count;
801798
fossil_print("TCL (Tcl %s)\n", TCL_PATCH_LEVEL);
802799
#endif
803800
#if defined(FOSSIL_ENABLE_TCL_STUBS)
804
- ++count;
805801
fossil_print("TCL_STUBS\n");
806802
#endif
807803
#if defined(FOSSIL_ENABLE_JSON)
808
- ++count;
809804
fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
810805
#endif
811806
}
812807
}
813808
814809
--- src/main.c
+++ src/main.c
@@ -785,29 +785,24 @@
785 fossil_print("This is fossil version " RELEASE_VERSION " "
786 MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
787 if(!find_option("verbose","v",0)){
788 return;
789 }else{
790 int count = 0;
791 fossil_print("Compiled on %s %s using %s (%d-bit)\n",
792 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
793 fossil_print("SQLite %s [%s],\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
794 fossil_print("zlib %s\n", ZLIB_VERSION);
795 #if defined(FOSSIL_ENABLE_SSL)
796 ++count;
797 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
798 #endif
799 #if defined(FOSSIL_ENABLE_TCL)
800 ++count;
801 fossil_print("TCL (Tcl %s)\n", TCL_PATCH_LEVEL);
802 #endif
803 #if defined(FOSSIL_ENABLE_TCL_STUBS)
804 ++count;
805 fossil_print("TCL_STUBS\n");
806 #endif
807 #if defined(FOSSIL_ENABLE_JSON)
808 ++count;
809 fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
810 #endif
811 }
812 }
813
814
--- src/main.c
+++ src/main.c
@@ -785,29 +785,24 @@
785 fossil_print("This is fossil version " RELEASE_VERSION " "
786 MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
787 if(!find_option("verbose","v",0)){
788 return;
789 }else{
 
790 fossil_print("Compiled on %s %s using %s (%d-bit)\n",
791 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
792 fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
793 fossil_print("zlib %s\n", ZLIB_VERSION);
794 #if defined(FOSSIL_ENABLE_SSL)
 
795 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
796 #endif
797 #if defined(FOSSIL_ENABLE_TCL)
 
798 fossil_print("TCL (Tcl %s)\n", TCL_PATCH_LEVEL);
799 #endif
800 #if defined(FOSSIL_ENABLE_TCL_STUBS)
 
801 fossil_print("TCL_STUBS\n");
802 #endif
803 #if defined(FOSSIL_ENABLE_JSON)
 
804 fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
805 #endif
806 }
807 }
808
809
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -430,11 +430,11 @@
430430
# here is to use the Sysinternals junction tool to create a hard
431431
# link between a "tcl-8.x" sub-directory of the Fossil source code
432432
# directory and the target Tcl directory. This removes the need to
433433
# hard-code the necessary paths in this Makefile.
434434
#
435
-TCLDIR = $(SRCDIR)/../tcl-8.6
435
+TCLDIR = $(SRCDIR)/../compat/tcl-8.6
436436
437437
#### The Tcl source code directory. This defaults to the same value as
438438
# TCLDIR macro (above), which may not be correct. This value will
439439
# only be used if the FOSSIL_TCL_SOURCE macro is defined.
440440
#
441441
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -430,11 +430,11 @@
430 # here is to use the Sysinternals junction tool to create a hard
431 # link between a "tcl-8.x" sub-directory of the Fossil source code
432 # directory and the target Tcl directory. This removes the need to
433 # hard-code the necessary paths in this Makefile.
434 #
435 TCLDIR = $(SRCDIR)/../tcl-8.6
436
437 #### The Tcl source code directory. This defaults to the same value as
438 # TCLDIR macro (above), which may not be correct. This value will
439 # only be used if the FOSSIL_TCL_SOURCE macro is defined.
440 #
441
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -430,11 +430,11 @@
430 # here is to use the Sysinternals junction tool to create a hard
431 # link between a "tcl-8.x" sub-directory of the Fossil source code
432 # directory and the target Tcl directory. This removes the need to
433 # hard-code the necessary paths in this Makefile.
434 #
435 TCLDIR = $(SRCDIR)/../compat/tcl-8.6
436
437 #### The Tcl source code directory. This defaults to the same value as
438 # TCLDIR macro (above), which may not be correct. This value will
439 # only be used if the FOSSIL_TCL_SOURCE macro is defined.
440 #
441
+25 -23
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670670
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671671
** [sqlite_version()] and [sqlite_source_id()].
672672
*/
673673
#define SQLITE_VERSION "3.7.17"
674674
#define SQLITE_VERSION_NUMBER 3007017
675
-#define SQLITE_SOURCE_ID "2013-06-18 20:06:23 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f"
675
+#define SQLITE_SOURCE_ID "2013-06-19 12:34:13 8f27f35f288434b9e7bc503c608f1e2b590ade4d"
676676
677677
/*
678678
** CAPI3REF: Run-Time Library Version Numbers
679679
** KEYWORDS: sqlite3_version, sqlite3_sourceid
680680
**
@@ -108403,18 +108403,34 @@
108403108403
108404108404
/* Search for an existing WhereLoop to overwrite, or which takes
108405108405
** priority over pTemplate.
108406108406
*/
108407108407
for(ppPrev=&pWInfo->pLoops, p=*ppPrev; p; ppPrev=&p->pNextLoop, p=*ppPrev){
108408
- if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ) continue;
108408
+ if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){
108409
+ /* If either the iTab or iSortIdx values for two WhereLoop are different
108410
+ ** then those WhereLoops need to be considered separately. Neither is
108411
+ ** a candidate to replace the other. */
108412
+ continue;
108413
+ }
108414
+ /* In the current implementation, the rSetup value is either zero
108415
+ ** or the cost of building an automatic index (NlogN) and the NlogN
108416
+ ** is the same for compatible WhereLoops. */
108417
+ assert( p->rSetup==0 || pTemplate->rSetup==0
108418
+ || p->rSetup==pTemplate->rSetup );
108419
+
108420
+ /* whereLoopAddBtree() always generates and inserts the automatic index
108421
+ ** case first. Hence compatible candidate WhereLoops never have a larger
108422
+ ** rSetup. Call this SETUP-INVARIANT */
108423
+ assert( p->rSetup>=pTemplate->rSetup );
108424
+
108409108425
if( (p->prereq & pTemplate->prereq)==p->prereq
108410108426
&& p->rSetup<=pTemplate->rSetup
108411108427
&& p->rRun<=pTemplate->rRun
108412108428
){
108413108429
/* This branch taken when p is equal or better than pTemplate in
108414108430
** all of (1) dependences (2) setup-cost, and (3) run-cost. */
108415
- testcase( p->rRun==pTemplate->rRun );
108431
+ assert( p->rSetup==pTemplate->rSetup );
108416108432
if( p->nLTerm<pTemplate->nLTerm
108417108433
&& (p->wsFlags & WHERE_INDEXED)!=0
108418108434
&& (pTemplate->wsFlags & WHERE_INDEXED)!=0
108419108435
&& p->u.btree.pIndex==pTemplate->u.btree.pIndex
108420108436
&& p->prereq==pTemplate->prereq
@@ -108421,42 +108437,26 @@
108421108437
){
108422108438
/* Overwrite an existing WhereLoop with an similar one that uses
108423108439
** more terms of the index */
108424108440
pNext = p->pNextLoop;
108425108441
break;
108426
- }else if( p->nOut>pTemplate->nOut
108427
- && p->rSetup==pTemplate->rSetup
108428
- && p->rRun==pTemplate->rRun
108429
- ){
108430
- /* Overwrite an existing WhereLoop with the same cost but more
108431
- ** outputs */
108432
- pNext = p->pNextLoop;
108433
- break;
108434108442
}else{
108435108443
/* pTemplate is not helpful.
108436108444
** Return without changing or adding anything */
108437108445
goto whereLoopInsert_noop;
108438108446
}
108439108447
}
108440
- testcase( (p->prereq & pTemplate->prereq)==p->prereq
108441
- && p->rSetup<=pTemplate->rSetup
108442
- && p->rRun==pTemplate->rRun+1 );
108443108448
if( (p->prereq & pTemplate->prereq)==pTemplate->prereq
108444
- && p->rSetup>=pTemplate->rSetup
108445108449
&& p->rRun>=pTemplate->rRun
108450
+ && ALWAYS(p->rSetup>=pTemplate->rSetup) /* See SETUP-INVARIANT above */
108446108451
){
108447108452
/* Overwrite an existing WhereLoop with a better one: one that is
108448108453
** better at one of (1) dependences, (2) setup-cost, or (3) run-cost
108449108454
** and is no worse in any of those categories. */
108450
- testcase( p->rSetup==pTemplate->rSetup );
108451
- testcase( p->rRun==pTemplate->rRun );
108452108455
pNext = p->pNextLoop;
108453108456
break;
108454108457
}
108455
- testcase( (p->prereq & pTemplate->prereq)==pTemplate->prereq
108456
- && p->rSetup>=pTemplate->rSetup
108457
- && p->rRun==pTemplate->rRun-1 );
108458108458
}
108459108459
108460108460
/* If we reach this point it means that either p[] should be overwritten
108461108461
** with pTemplate[] if p[] exists, or if p==NULL then allocate a new
108462108462
** WhereLoop and insert it.
@@ -108525,11 +108525,11 @@
108525108525
WhereCost saved_nOut; /* Original value of pNew->nOut */
108526108526
int iCol; /* Index of the column in the table */
108527108527
int rc = SQLITE_OK; /* Return code */
108528108528
WhereCost nRowEst; /* Estimated index selectivity */
108529108529
WhereCost rLogSize; /* Logarithm of table size */
108530
- WhereTerm *pTop, *pBtm; /* Top and bottom range constraints */
108530
+ WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */
108531108531
108532108532
pNew = pBuilder->pNew;
108533108533
if( db->mallocFailed ) return SQLITE_NOMEM;
108534108534
108535108535
assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
@@ -109075,11 +109075,11 @@
109075109075
iCur = pItem->iCursor;
109076109076
sSubBuild = *pBuilder;
109077109077
sSubBuild.pOrderBy = 0;
109078109078
sSubBuild.pBest = &sBest;
109079109079
109080
- for(pOrTerm=pOrWC->a; rc==SQLITE_OK && pOrTerm<pOrWCEnd; pOrTerm++){
109080
+ for(pOrTerm=pOrWC->a; pOrTerm<pOrWCEnd; pOrTerm++){
109081109081
if( (pOrTerm->eOperator & WO_AND)!=0 ){
109082109082
sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc;
109083109083
}else if( pOrTerm->leftCursor==iCur ){
109084109084
tempWC.pWInfo = pWC->pWInfo;
109085109085
tempWC.pOuter = pWC;
@@ -109099,10 +109099,12 @@
109099109099
}else
109100109100
#endif
109101109101
{
109102109102
rc = whereLoopAddBtree(&sSubBuild, mExtra);
109103109103
}
109104
+ /* sBest.maskSelf is always zero if an error occurs */
109105
+ assert( rc==SQLITE_OK || sBest.maskSelf==0 );
109104109106
if( sBest.maskSelf==0 ) break;
109105109107
assert( sBest.rSetup==0 );
109106109108
rTotal = whereCostAdd(rTotal, sBest.rRun);
109107109109
nRow = whereCostAdd(nRow, sBest.nOut);
109108109110
prereq |= sBest.prereq;
@@ -109439,11 +109441,11 @@
109439109441
Parse *pParse; /* Parsing context */
109440109442
sqlite3 *db; /* The database connection */
109441109443
int iLoop; /* Loop counter over the terms of the join */
109442109444
int ii, jj; /* Loop counters */
109443109445
WhereCost rCost; /* Cost of a path */
109444
- WhereCost mxCost; /* Maximum cost of a set of paths */
109446
+ WhereCost mxCost = 0; /* Maximum cost of a set of paths */
109445109447
WhereCost rSortCost; /* Cost to do a sort */
109446109448
int nTo, nFrom; /* Number of valid entries in aTo[] and aFrom[] */
109447109449
WherePath *aFrom; /* All nFrom paths at the previous level */
109448109450
WherePath *aTo; /* The nTo best paths at the current level */
109449109451
WherePath *pFrom; /* An element of aFrom[] that we are working on */
109450109452
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671 ** [sqlite_version()] and [sqlite_source_id()].
672 */
673 #define SQLITE_VERSION "3.7.17"
674 #define SQLITE_VERSION_NUMBER 3007017
675 #define SQLITE_SOURCE_ID "2013-06-18 20:06:23 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f"
676
677 /*
678 ** CAPI3REF: Run-Time Library Version Numbers
679 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
680 **
@@ -108403,18 +108403,34 @@
108403
108404 /* Search for an existing WhereLoop to overwrite, or which takes
108405 ** priority over pTemplate.
108406 */
108407 for(ppPrev=&pWInfo->pLoops, p=*ppPrev; p; ppPrev=&p->pNextLoop, p=*ppPrev){
108408 if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ) continue;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108409 if( (p->prereq & pTemplate->prereq)==p->prereq
108410 && p->rSetup<=pTemplate->rSetup
108411 && p->rRun<=pTemplate->rRun
108412 ){
108413 /* This branch taken when p is equal or better than pTemplate in
108414 ** all of (1) dependences (2) setup-cost, and (3) run-cost. */
108415 testcase( p->rRun==pTemplate->rRun );
108416 if( p->nLTerm<pTemplate->nLTerm
108417 && (p->wsFlags & WHERE_INDEXED)!=0
108418 && (pTemplate->wsFlags & WHERE_INDEXED)!=0
108419 && p->u.btree.pIndex==pTemplate->u.btree.pIndex
108420 && p->prereq==pTemplate->prereq
@@ -108421,42 +108437,26 @@
108421 ){
108422 /* Overwrite an existing WhereLoop with an similar one that uses
108423 ** more terms of the index */
108424 pNext = p->pNextLoop;
108425 break;
108426 }else if( p->nOut>pTemplate->nOut
108427 && p->rSetup==pTemplate->rSetup
108428 && p->rRun==pTemplate->rRun
108429 ){
108430 /* Overwrite an existing WhereLoop with the same cost but more
108431 ** outputs */
108432 pNext = p->pNextLoop;
108433 break;
108434 }else{
108435 /* pTemplate is not helpful.
108436 ** Return without changing or adding anything */
108437 goto whereLoopInsert_noop;
108438 }
108439 }
108440 testcase( (p->prereq & pTemplate->prereq)==p->prereq
108441 && p->rSetup<=pTemplate->rSetup
108442 && p->rRun==pTemplate->rRun+1 );
108443 if( (p->prereq & pTemplate->prereq)==pTemplate->prereq
108444 && p->rSetup>=pTemplate->rSetup
108445 && p->rRun>=pTemplate->rRun
 
108446 ){
108447 /* Overwrite an existing WhereLoop with a better one: one that is
108448 ** better at one of (1) dependences, (2) setup-cost, or (3) run-cost
108449 ** and is no worse in any of those categories. */
108450 testcase( p->rSetup==pTemplate->rSetup );
108451 testcase( p->rRun==pTemplate->rRun );
108452 pNext = p->pNextLoop;
108453 break;
108454 }
108455 testcase( (p->prereq & pTemplate->prereq)==pTemplate->prereq
108456 && p->rSetup>=pTemplate->rSetup
108457 && p->rRun==pTemplate->rRun-1 );
108458 }
108459
108460 /* If we reach this point it means that either p[] should be overwritten
108461 ** with pTemplate[] if p[] exists, or if p==NULL then allocate a new
108462 ** WhereLoop and insert it.
@@ -108525,11 +108525,11 @@
108525 WhereCost saved_nOut; /* Original value of pNew->nOut */
108526 int iCol; /* Index of the column in the table */
108527 int rc = SQLITE_OK; /* Return code */
108528 WhereCost nRowEst; /* Estimated index selectivity */
108529 WhereCost rLogSize; /* Logarithm of table size */
108530 WhereTerm *pTop, *pBtm; /* Top and bottom range constraints */
108531
108532 pNew = pBuilder->pNew;
108533 if( db->mallocFailed ) return SQLITE_NOMEM;
108534
108535 assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
@@ -109075,11 +109075,11 @@
109075 iCur = pItem->iCursor;
109076 sSubBuild = *pBuilder;
109077 sSubBuild.pOrderBy = 0;
109078 sSubBuild.pBest = &sBest;
109079
109080 for(pOrTerm=pOrWC->a; rc==SQLITE_OK && pOrTerm<pOrWCEnd; pOrTerm++){
109081 if( (pOrTerm->eOperator & WO_AND)!=0 ){
109082 sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc;
109083 }else if( pOrTerm->leftCursor==iCur ){
109084 tempWC.pWInfo = pWC->pWInfo;
109085 tempWC.pOuter = pWC;
@@ -109099,10 +109099,12 @@
109099 }else
109100 #endif
109101 {
109102 rc = whereLoopAddBtree(&sSubBuild, mExtra);
109103 }
 
 
109104 if( sBest.maskSelf==0 ) break;
109105 assert( sBest.rSetup==0 );
109106 rTotal = whereCostAdd(rTotal, sBest.rRun);
109107 nRow = whereCostAdd(nRow, sBest.nOut);
109108 prereq |= sBest.prereq;
@@ -109439,11 +109441,11 @@
109439 Parse *pParse; /* Parsing context */
109440 sqlite3 *db; /* The database connection */
109441 int iLoop; /* Loop counter over the terms of the join */
109442 int ii, jj; /* Loop counters */
109443 WhereCost rCost; /* Cost of a path */
109444 WhereCost mxCost; /* Maximum cost of a set of paths */
109445 WhereCost rSortCost; /* Cost to do a sort */
109446 int nTo, nFrom; /* Number of valid entries in aTo[] and aFrom[] */
109447 WherePath *aFrom; /* All nFrom paths at the previous level */
109448 WherePath *aTo; /* The nTo best paths at the current level */
109449 WherePath *pFrom; /* An element of aFrom[] that we are working on */
109450
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671 ** [sqlite_version()] and [sqlite_source_id()].
672 */
673 #define SQLITE_VERSION "3.7.17"
674 #define SQLITE_VERSION_NUMBER 3007017
675 #define SQLITE_SOURCE_ID "2013-06-19 12:34:13 8f27f35f288434b9e7bc503c608f1e2b590ade4d"
676
677 /*
678 ** CAPI3REF: Run-Time Library Version Numbers
679 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
680 **
@@ -108403,18 +108403,34 @@
108403
108404 /* Search for an existing WhereLoop to overwrite, or which takes
108405 ** priority over pTemplate.
108406 */
108407 for(ppPrev=&pWInfo->pLoops, p=*ppPrev; p; ppPrev=&p->pNextLoop, p=*ppPrev){
108408 if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){
108409 /* If either the iTab or iSortIdx values for two WhereLoop are different
108410 ** then those WhereLoops need to be considered separately. Neither is
108411 ** a candidate to replace the other. */
108412 continue;
108413 }
108414 /* In the current implementation, the rSetup value is either zero
108415 ** or the cost of building an automatic index (NlogN) and the NlogN
108416 ** is the same for compatible WhereLoops. */
108417 assert( p->rSetup==0 || pTemplate->rSetup==0
108418 || p->rSetup==pTemplate->rSetup );
108419
108420 /* whereLoopAddBtree() always generates and inserts the automatic index
108421 ** case first. Hence compatible candidate WhereLoops never have a larger
108422 ** rSetup. Call this SETUP-INVARIANT */
108423 assert( p->rSetup>=pTemplate->rSetup );
108424
108425 if( (p->prereq & pTemplate->prereq)==p->prereq
108426 && p->rSetup<=pTemplate->rSetup
108427 && p->rRun<=pTemplate->rRun
108428 ){
108429 /* This branch taken when p is equal or better than pTemplate in
108430 ** all of (1) dependences (2) setup-cost, and (3) run-cost. */
108431 assert( p->rSetup==pTemplate->rSetup );
108432 if( p->nLTerm<pTemplate->nLTerm
108433 && (p->wsFlags & WHERE_INDEXED)!=0
108434 && (pTemplate->wsFlags & WHERE_INDEXED)!=0
108435 && p->u.btree.pIndex==pTemplate->u.btree.pIndex
108436 && p->prereq==pTemplate->prereq
@@ -108421,42 +108437,26 @@
108437 ){
108438 /* Overwrite an existing WhereLoop with an similar one that uses
108439 ** more terms of the index */
108440 pNext = p->pNextLoop;
108441 break;
 
 
 
 
 
 
 
 
108442 }else{
108443 /* pTemplate is not helpful.
108444 ** Return without changing or adding anything */
108445 goto whereLoopInsert_noop;
108446 }
108447 }
 
 
 
108448 if( (p->prereq & pTemplate->prereq)==pTemplate->prereq
 
108449 && p->rRun>=pTemplate->rRun
108450 && ALWAYS(p->rSetup>=pTemplate->rSetup) /* See SETUP-INVARIANT above */
108451 ){
108452 /* Overwrite an existing WhereLoop with a better one: one that is
108453 ** better at one of (1) dependences, (2) setup-cost, or (3) run-cost
108454 ** and is no worse in any of those categories. */
 
 
108455 pNext = p->pNextLoop;
108456 break;
108457 }
 
 
 
108458 }
108459
108460 /* If we reach this point it means that either p[] should be overwritten
108461 ** with pTemplate[] if p[] exists, or if p==NULL then allocate a new
108462 ** WhereLoop and insert it.
@@ -108525,11 +108525,11 @@
108525 WhereCost saved_nOut; /* Original value of pNew->nOut */
108526 int iCol; /* Index of the column in the table */
108527 int rc = SQLITE_OK; /* Return code */
108528 WhereCost nRowEst; /* Estimated index selectivity */
108529 WhereCost rLogSize; /* Logarithm of table size */
108530 WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */
108531
108532 pNew = pBuilder->pNew;
108533 if( db->mallocFailed ) return SQLITE_NOMEM;
108534
108535 assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
@@ -109075,11 +109075,11 @@
109075 iCur = pItem->iCursor;
109076 sSubBuild = *pBuilder;
109077 sSubBuild.pOrderBy = 0;
109078 sSubBuild.pBest = &sBest;
109079
109080 for(pOrTerm=pOrWC->a; pOrTerm<pOrWCEnd; pOrTerm++){
109081 if( (pOrTerm->eOperator & WO_AND)!=0 ){
109082 sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc;
109083 }else if( pOrTerm->leftCursor==iCur ){
109084 tempWC.pWInfo = pWC->pWInfo;
109085 tempWC.pOuter = pWC;
@@ -109099,10 +109099,12 @@
109099 }else
109100 #endif
109101 {
109102 rc = whereLoopAddBtree(&sSubBuild, mExtra);
109103 }
109104 /* sBest.maskSelf is always zero if an error occurs */
109105 assert( rc==SQLITE_OK || sBest.maskSelf==0 );
109106 if( sBest.maskSelf==0 ) break;
109107 assert( sBest.rSetup==0 );
109108 rTotal = whereCostAdd(rTotal, sBest.rRun);
109109 nRow = whereCostAdd(nRow, sBest.nOut);
109110 prereq |= sBest.prereq;
@@ -109439,11 +109441,11 @@
109441 Parse *pParse; /* Parsing context */
109442 sqlite3 *db; /* The database connection */
109443 int iLoop; /* Loop counter over the terms of the join */
109444 int ii, jj; /* Loop counters */
109445 WhereCost rCost; /* Cost of a path */
109446 WhereCost mxCost = 0; /* Maximum cost of a set of paths */
109447 WhereCost rSortCost; /* Cost to do a sort */
109448 int nTo, nFrom; /* Number of valid entries in aTo[] and aFrom[] */
109449 WherePath *aFrom; /* All nFrom paths at the previous level */
109450 WherePath *aTo; /* The nTo best paths at the current level */
109451 WherePath *pFrom; /* An element of aFrom[] that we are working on */
109452
+25 -23
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670670
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671671
** [sqlite_version()] and [sqlite_source_id()].
672672
*/
673673
#define SQLITE_VERSION "3.7.17"
674674
#define SQLITE_VERSION_NUMBER 3007017
675
-#define SQLITE_SOURCE_ID "2013-06-18 20:06:23 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f"
675
+#define SQLITE_SOURCE_ID "2013-06-19 12:34:13 8f27f35f288434b9e7bc503c608f1e2b590ade4d"
676676
677677
/*
678678
** CAPI3REF: Run-Time Library Version Numbers
679679
** KEYWORDS: sqlite3_version, sqlite3_sourceid
680680
**
@@ -108403,18 +108403,34 @@
108403108403
108404108404
/* Search for an existing WhereLoop to overwrite, or which takes
108405108405
** priority over pTemplate.
108406108406
*/
108407108407
for(ppPrev=&pWInfo->pLoops, p=*ppPrev; p; ppPrev=&p->pNextLoop, p=*ppPrev){
108408
- if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ) continue;
108408
+ if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){
108409
+ /* If either the iTab or iSortIdx values for two WhereLoop are different
108410
+ ** then those WhereLoops need to be considered separately. Neither is
108411
+ ** a candidate to replace the other. */
108412
+ continue;
108413
+ }
108414
+ /* In the current implementation, the rSetup value is either zero
108415
+ ** or the cost of building an automatic index (NlogN) and the NlogN
108416
+ ** is the same for compatible WhereLoops. */
108417
+ assert( p->rSetup==0 || pTemplate->rSetup==0
108418
+ || p->rSetup==pTemplate->rSetup );
108419
+
108420
+ /* whereLoopAddBtree() always generates and inserts the automatic index
108421
+ ** case first. Hence compatible candidate WhereLoops never have a larger
108422
+ ** rSetup. Call this SETUP-INVARIANT */
108423
+ assert( p->rSetup>=pTemplate->rSetup );
108424
+
108409108425
if( (p->prereq & pTemplate->prereq)==p->prereq
108410108426
&& p->rSetup<=pTemplate->rSetup
108411108427
&& p->rRun<=pTemplate->rRun
108412108428
){
108413108429
/* This branch taken when p is equal or better than pTemplate in
108414108430
** all of (1) dependences (2) setup-cost, and (3) run-cost. */
108415
- testcase( p->rRun==pTemplate->rRun );
108431
+ assert( p->rSetup==pTemplate->rSetup );
108416108432
if( p->nLTerm<pTemplate->nLTerm
108417108433
&& (p->wsFlags & WHERE_INDEXED)!=0
108418108434
&& (pTemplate->wsFlags & WHERE_INDEXED)!=0
108419108435
&& p->u.btree.pIndex==pTemplate->u.btree.pIndex
108420108436
&& p->prereq==pTemplate->prereq
@@ -108421,42 +108437,26 @@
108421108437
){
108422108438
/* Overwrite an existing WhereLoop with an similar one that uses
108423108439
** more terms of the index */
108424108440
pNext = p->pNextLoop;
108425108441
break;
108426
- }else if( p->nOut>pTemplate->nOut
108427
- && p->rSetup==pTemplate->rSetup
108428
- && p->rRun==pTemplate->rRun
108429
- ){
108430
- /* Overwrite an existing WhereLoop with the same cost but more
108431
- ** outputs */
108432
- pNext = p->pNextLoop;
108433
- break;
108434108442
}else{
108435108443
/* pTemplate is not helpful.
108436108444
** Return without changing or adding anything */
108437108445
goto whereLoopInsert_noop;
108438108446
}
108439108447
}
108440
- testcase( (p->prereq & pTemplate->prereq)==p->prereq
108441
- && p->rSetup<=pTemplate->rSetup
108442
- && p->rRun==pTemplate->rRun+1 );
108443108448
if( (p->prereq & pTemplate->prereq)==pTemplate->prereq
108444
- && p->rSetup>=pTemplate->rSetup
108445108449
&& p->rRun>=pTemplate->rRun
108450
+ && ALWAYS(p->rSetup>=pTemplate->rSetup) /* See SETUP-INVARIANT above */
108446108451
){
108447108452
/* Overwrite an existing WhereLoop with a better one: one that is
108448108453
** better at one of (1) dependences, (2) setup-cost, or (3) run-cost
108449108454
** and is no worse in any of those categories. */
108450
- testcase( p->rSetup==pTemplate->rSetup );
108451
- testcase( p->rRun==pTemplate->rRun );
108452108455
pNext = p->pNextLoop;
108453108456
break;
108454108457
}
108455
- testcase( (p->prereq & pTemplate->prereq)==pTemplate->prereq
108456
- && p->rSetup>=pTemplate->rSetup
108457
- && p->rRun==pTemplate->rRun-1 );
108458108458
}
108459108459
108460108460
/* If we reach this point it means that either p[] should be overwritten
108461108461
** with pTemplate[] if p[] exists, or if p==NULL then allocate a new
108462108462
** WhereLoop and insert it.
@@ -108525,11 +108525,11 @@
108525108525
WhereCost saved_nOut; /* Original value of pNew->nOut */
108526108526
int iCol; /* Index of the column in the table */
108527108527
int rc = SQLITE_OK; /* Return code */
108528108528
WhereCost nRowEst; /* Estimated index selectivity */
108529108529
WhereCost rLogSize; /* Logarithm of table size */
108530
- WhereTerm *pTop, *pBtm; /* Top and bottom range constraints */
108530
+ WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */
108531108531
108532108532
pNew = pBuilder->pNew;
108533108533
if( db->mallocFailed ) return SQLITE_NOMEM;
108534108534
108535108535
assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
@@ -109075,11 +109075,11 @@
109075109075
iCur = pItem->iCursor;
109076109076
sSubBuild = *pBuilder;
109077109077
sSubBuild.pOrderBy = 0;
109078109078
sSubBuild.pBest = &sBest;
109079109079
109080
- for(pOrTerm=pOrWC->a; rc==SQLITE_OK && pOrTerm<pOrWCEnd; pOrTerm++){
109080
+ for(pOrTerm=pOrWC->a; pOrTerm<pOrWCEnd; pOrTerm++){
109081109081
if( (pOrTerm->eOperator & WO_AND)!=0 ){
109082109082
sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc;
109083109083
}else if( pOrTerm->leftCursor==iCur ){
109084109084
tempWC.pWInfo = pWC->pWInfo;
109085109085
tempWC.pOuter = pWC;
@@ -109099,10 +109099,12 @@
109099109099
}else
109100109100
#endif
109101109101
{
109102109102
rc = whereLoopAddBtree(&sSubBuild, mExtra);
109103109103
}
109104
+ /* sBest.maskSelf is always zero if an error occurs */
109105
+ assert( rc==SQLITE_OK || sBest.maskSelf==0 );
109104109106
if( sBest.maskSelf==0 ) break;
109105109107
assert( sBest.rSetup==0 );
109106109108
rTotal = whereCostAdd(rTotal, sBest.rRun);
109107109109
nRow = whereCostAdd(nRow, sBest.nOut);
109108109110
prereq |= sBest.prereq;
@@ -109439,11 +109441,11 @@
109439109441
Parse *pParse; /* Parsing context */
109440109442
sqlite3 *db; /* The database connection */
109441109443
int iLoop; /* Loop counter over the terms of the join */
109442109444
int ii, jj; /* Loop counters */
109443109445
WhereCost rCost; /* Cost of a path */
109444
- WhereCost mxCost; /* Maximum cost of a set of paths */
109446
+ WhereCost mxCost = 0; /* Maximum cost of a set of paths */
109445109447
WhereCost rSortCost; /* Cost to do a sort */
109446109448
int nTo, nFrom; /* Number of valid entries in aTo[] and aFrom[] */
109447109449
WherePath *aFrom; /* All nFrom paths at the previous level */
109448109450
WherePath *aTo; /* The nTo best paths at the current level */
109449109451
WherePath *pFrom; /* An element of aFrom[] that we are working on */
109450109452
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671 ** [sqlite_version()] and [sqlite_source_id()].
672 */
673 #define SQLITE_VERSION "3.7.17"
674 #define SQLITE_VERSION_NUMBER 3007017
675 #define SQLITE_SOURCE_ID "2013-06-18 20:06:23 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f"
676
677 /*
678 ** CAPI3REF: Run-Time Library Version Numbers
679 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
680 **
@@ -108403,18 +108403,34 @@
108403
108404 /* Search for an existing WhereLoop to overwrite, or which takes
108405 ** priority over pTemplate.
108406 */
108407 for(ppPrev=&pWInfo->pLoops, p=*ppPrev; p; ppPrev=&p->pNextLoop, p=*ppPrev){
108408 if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ) continue;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108409 if( (p->prereq & pTemplate->prereq)==p->prereq
108410 && p->rSetup<=pTemplate->rSetup
108411 && p->rRun<=pTemplate->rRun
108412 ){
108413 /* This branch taken when p is equal or better than pTemplate in
108414 ** all of (1) dependences (2) setup-cost, and (3) run-cost. */
108415 testcase( p->rRun==pTemplate->rRun );
108416 if( p->nLTerm<pTemplate->nLTerm
108417 && (p->wsFlags & WHERE_INDEXED)!=0
108418 && (pTemplate->wsFlags & WHERE_INDEXED)!=0
108419 && p->u.btree.pIndex==pTemplate->u.btree.pIndex
108420 && p->prereq==pTemplate->prereq
@@ -108421,42 +108437,26 @@
108421 ){
108422 /* Overwrite an existing WhereLoop with an similar one that uses
108423 ** more terms of the index */
108424 pNext = p->pNextLoop;
108425 break;
108426 }else if( p->nOut>pTemplate->nOut
108427 && p->rSetup==pTemplate->rSetup
108428 && p->rRun==pTemplate->rRun
108429 ){
108430 /* Overwrite an existing WhereLoop with the same cost but more
108431 ** outputs */
108432 pNext = p->pNextLoop;
108433 break;
108434 }else{
108435 /* pTemplate is not helpful.
108436 ** Return without changing or adding anything */
108437 goto whereLoopInsert_noop;
108438 }
108439 }
108440 testcase( (p->prereq & pTemplate->prereq)==p->prereq
108441 && p->rSetup<=pTemplate->rSetup
108442 && p->rRun==pTemplate->rRun+1 );
108443 if( (p->prereq & pTemplate->prereq)==pTemplate->prereq
108444 && p->rSetup>=pTemplate->rSetup
108445 && p->rRun>=pTemplate->rRun
 
108446 ){
108447 /* Overwrite an existing WhereLoop with a better one: one that is
108448 ** better at one of (1) dependences, (2) setup-cost, or (3) run-cost
108449 ** and is no worse in any of those categories. */
108450 testcase( p->rSetup==pTemplate->rSetup );
108451 testcase( p->rRun==pTemplate->rRun );
108452 pNext = p->pNextLoop;
108453 break;
108454 }
108455 testcase( (p->prereq & pTemplate->prereq)==pTemplate->prereq
108456 && p->rSetup>=pTemplate->rSetup
108457 && p->rRun==pTemplate->rRun-1 );
108458 }
108459
108460 /* If we reach this point it means that either p[] should be overwritten
108461 ** with pTemplate[] if p[] exists, or if p==NULL then allocate a new
108462 ** WhereLoop and insert it.
@@ -108525,11 +108525,11 @@
108525 WhereCost saved_nOut; /* Original value of pNew->nOut */
108526 int iCol; /* Index of the column in the table */
108527 int rc = SQLITE_OK; /* Return code */
108528 WhereCost nRowEst; /* Estimated index selectivity */
108529 WhereCost rLogSize; /* Logarithm of table size */
108530 WhereTerm *pTop, *pBtm; /* Top and bottom range constraints */
108531
108532 pNew = pBuilder->pNew;
108533 if( db->mallocFailed ) return SQLITE_NOMEM;
108534
108535 assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
@@ -109075,11 +109075,11 @@
109075 iCur = pItem->iCursor;
109076 sSubBuild = *pBuilder;
109077 sSubBuild.pOrderBy = 0;
109078 sSubBuild.pBest = &sBest;
109079
109080 for(pOrTerm=pOrWC->a; rc==SQLITE_OK && pOrTerm<pOrWCEnd; pOrTerm++){
109081 if( (pOrTerm->eOperator & WO_AND)!=0 ){
109082 sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc;
109083 }else if( pOrTerm->leftCursor==iCur ){
109084 tempWC.pWInfo = pWC->pWInfo;
109085 tempWC.pOuter = pWC;
@@ -109099,10 +109099,12 @@
109099 }else
109100 #endif
109101 {
109102 rc = whereLoopAddBtree(&sSubBuild, mExtra);
109103 }
 
 
109104 if( sBest.maskSelf==0 ) break;
109105 assert( sBest.rSetup==0 );
109106 rTotal = whereCostAdd(rTotal, sBest.rRun);
109107 nRow = whereCostAdd(nRow, sBest.nOut);
109108 prereq |= sBest.prereq;
@@ -109439,11 +109441,11 @@
109439 Parse *pParse; /* Parsing context */
109440 sqlite3 *db; /* The database connection */
109441 int iLoop; /* Loop counter over the terms of the join */
109442 int ii, jj; /* Loop counters */
109443 WhereCost rCost; /* Cost of a path */
109444 WhereCost mxCost; /* Maximum cost of a set of paths */
109445 WhereCost rSortCost; /* Cost to do a sort */
109446 int nTo, nFrom; /* Number of valid entries in aTo[] and aFrom[] */
109447 WherePath *aFrom; /* All nFrom paths at the previous level */
109448 WherePath *aTo; /* The nTo best paths at the current level */
109449 WherePath *pFrom; /* An element of aFrom[] that we are working on */
109450
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -670,11 +670,11 @@
670 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
671 ** [sqlite_version()] and [sqlite_source_id()].
672 */
673 #define SQLITE_VERSION "3.7.17"
674 #define SQLITE_VERSION_NUMBER 3007017
675 #define SQLITE_SOURCE_ID "2013-06-19 12:34:13 8f27f35f288434b9e7bc503c608f1e2b590ade4d"
676
677 /*
678 ** CAPI3REF: Run-Time Library Version Numbers
679 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
680 **
@@ -108403,18 +108403,34 @@
108403
108404 /* Search for an existing WhereLoop to overwrite, or which takes
108405 ** priority over pTemplate.
108406 */
108407 for(ppPrev=&pWInfo->pLoops, p=*ppPrev; p; ppPrev=&p->pNextLoop, p=*ppPrev){
108408 if( p->iTab!=pTemplate->iTab || p->iSortIdx!=pTemplate->iSortIdx ){
108409 /* If either the iTab or iSortIdx values for two WhereLoop are different
108410 ** then those WhereLoops need to be considered separately. Neither is
108411 ** a candidate to replace the other. */
108412 continue;
108413 }
108414 /* In the current implementation, the rSetup value is either zero
108415 ** or the cost of building an automatic index (NlogN) and the NlogN
108416 ** is the same for compatible WhereLoops. */
108417 assert( p->rSetup==0 || pTemplate->rSetup==0
108418 || p->rSetup==pTemplate->rSetup );
108419
108420 /* whereLoopAddBtree() always generates and inserts the automatic index
108421 ** case first. Hence compatible candidate WhereLoops never have a larger
108422 ** rSetup. Call this SETUP-INVARIANT */
108423 assert( p->rSetup>=pTemplate->rSetup );
108424
108425 if( (p->prereq & pTemplate->prereq)==p->prereq
108426 && p->rSetup<=pTemplate->rSetup
108427 && p->rRun<=pTemplate->rRun
108428 ){
108429 /* This branch taken when p is equal or better than pTemplate in
108430 ** all of (1) dependences (2) setup-cost, and (3) run-cost. */
108431 assert( p->rSetup==pTemplate->rSetup );
108432 if( p->nLTerm<pTemplate->nLTerm
108433 && (p->wsFlags & WHERE_INDEXED)!=0
108434 && (pTemplate->wsFlags & WHERE_INDEXED)!=0
108435 && p->u.btree.pIndex==pTemplate->u.btree.pIndex
108436 && p->prereq==pTemplate->prereq
@@ -108421,42 +108437,26 @@
108437 ){
108438 /* Overwrite an existing WhereLoop with an similar one that uses
108439 ** more terms of the index */
108440 pNext = p->pNextLoop;
108441 break;
 
 
 
 
 
 
 
 
108442 }else{
108443 /* pTemplate is not helpful.
108444 ** Return without changing or adding anything */
108445 goto whereLoopInsert_noop;
108446 }
108447 }
 
 
 
108448 if( (p->prereq & pTemplate->prereq)==pTemplate->prereq
 
108449 && p->rRun>=pTemplate->rRun
108450 && ALWAYS(p->rSetup>=pTemplate->rSetup) /* See SETUP-INVARIANT above */
108451 ){
108452 /* Overwrite an existing WhereLoop with a better one: one that is
108453 ** better at one of (1) dependences, (2) setup-cost, or (3) run-cost
108454 ** and is no worse in any of those categories. */
 
 
108455 pNext = p->pNextLoop;
108456 break;
108457 }
 
 
 
108458 }
108459
108460 /* If we reach this point it means that either p[] should be overwritten
108461 ** with pTemplate[] if p[] exists, or if p==NULL then allocate a new
108462 ** WhereLoop and insert it.
@@ -108525,11 +108525,11 @@
108525 WhereCost saved_nOut; /* Original value of pNew->nOut */
108526 int iCol; /* Index of the column in the table */
108527 int rc = SQLITE_OK; /* Return code */
108528 WhereCost nRowEst; /* Estimated index selectivity */
108529 WhereCost rLogSize; /* Logarithm of table size */
108530 WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */
108531
108532 pNew = pBuilder->pNew;
108533 if( db->mallocFailed ) return SQLITE_NOMEM;
108534
108535 assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
@@ -109075,11 +109075,11 @@
109075 iCur = pItem->iCursor;
109076 sSubBuild = *pBuilder;
109077 sSubBuild.pOrderBy = 0;
109078 sSubBuild.pBest = &sBest;
109079
109080 for(pOrTerm=pOrWC->a; pOrTerm<pOrWCEnd; pOrTerm++){
109081 if( (pOrTerm->eOperator & WO_AND)!=0 ){
109082 sSubBuild.pWC = &pOrTerm->u.pAndInfo->wc;
109083 }else if( pOrTerm->leftCursor==iCur ){
109084 tempWC.pWInfo = pWC->pWInfo;
109085 tempWC.pOuter = pWC;
@@ -109099,10 +109099,12 @@
109099 }else
109100 #endif
109101 {
109102 rc = whereLoopAddBtree(&sSubBuild, mExtra);
109103 }
109104 /* sBest.maskSelf is always zero if an error occurs */
109105 assert( rc==SQLITE_OK || sBest.maskSelf==0 );
109106 if( sBest.maskSelf==0 ) break;
109107 assert( sBest.rSetup==0 );
109108 rTotal = whereCostAdd(rTotal, sBest.rRun);
109109 nRow = whereCostAdd(nRow, sBest.nOut);
109110 prereq |= sBest.prereq;
@@ -109439,11 +109441,11 @@
109441 Parse *pParse; /* Parsing context */
109442 sqlite3 *db; /* The database connection */
109443 int iLoop; /* Loop counter over the terms of the join */
109444 int ii, jj; /* Loop counters */
109445 WhereCost rCost; /* Cost of a path */
109446 WhereCost mxCost = 0; /* Maximum cost of a set of paths */
109447 WhereCost rSortCost; /* Cost to do a sort */
109448 int nTo, nFrom; /* Number of valid entries in aTo[] and aFrom[] */
109449 WherePath *aFrom; /* All nFrom paths at the previous level */
109450 WherePath *aTo; /* The nTo best paths at the current level */
109451 WherePath *pFrom; /* An element of aFrom[] that we are working on */
109452
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.7.17"
111111
#define SQLITE_VERSION_NUMBER 3007017
112
-#define SQLITE_SOURCE_ID "2013-06-18 20:06:23 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f"
112
+#define SQLITE_SOURCE_ID "2013-06-19 12:34:13 8f27f35f288434b9e7bc503c608f1e2b590ade4d"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
118118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.17"
111 #define SQLITE_VERSION_NUMBER 3007017
112 #define SQLITE_SOURCE_ID "2013-06-18 20:06:23 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.17"
111 #define SQLITE_VERSION_NUMBER 3007017
112 #define SQLITE_SOURCE_ID "2013-06-19 12:34:13 8f27f35f288434b9e7bc503c608f1e2b590ade4d"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.7.17"
111111
#define SQLITE_VERSION_NUMBER 3007017
112
-#define SQLITE_SOURCE_ID "2013-06-18 20:06:23 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f"
112
+#define SQLITE_SOURCE_ID "2013-06-19 12:34:13 8f27f35f288434b9e7bc503c608f1e2b590ade4d"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
118118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.17"
111 #define SQLITE_VERSION_NUMBER 3007017
112 #define SQLITE_SOURCE_ID "2013-06-18 20:06:23 4fbb0c4d26c54aaefbe5397cde2a0b9d2ce3885f"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.7.17"
111 #define SQLITE_VERSION_NUMBER 3007017
112 #define SQLITE_SOURCE_ID "2013-06-19 12:34:13 8f27f35f288434b9e7bc503c608f1e2b590ade4d"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -94,11 +94,11 @@
9494
# here is to use the Sysinternals junction tool to create a hard
9595
# link between a "tcl-8.x" sub-directory of the Fossil source code
9696
# directory and the target Tcl directory. This removes the need to
9797
# hard-code the necessary paths in this Makefile.
9898
#
99
-TCLDIR = $(SRCDIR)/../tcl-8.6
99
+TCLDIR = $(SRCDIR)/../compat/tcl-8.6
100100
101101
#### The Tcl source code directory. This defaults to the same value as
102102
# TCLDIR macro (above), which may not be correct. This value will
103103
# only be used if the FOSSIL_TCL_SOURCE macro is defined.
104104
#
105105
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -94,11 +94,11 @@
94 # here is to use the Sysinternals junction tool to create a hard
95 # link between a "tcl-8.x" sub-directory of the Fossil source code
96 # directory and the target Tcl directory. This removes the need to
97 # hard-code the necessary paths in this Makefile.
98 #
99 TCLDIR = $(SRCDIR)/../tcl-8.6
100
101 #### The Tcl source code directory. This defaults to the same value as
102 # TCLDIR macro (above), which may not be correct. This value will
103 # only be used if the FOSSIL_TCL_SOURCE macro is defined.
104 #
105
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -94,11 +94,11 @@
94 # here is to use the Sysinternals junction tool to create a hard
95 # link between a "tcl-8.x" sub-directory of the Fossil source code
96 # directory and the target Tcl directory. This removes the need to
97 # hard-code the necessary paths in this Makefile.
98 #
99 TCLDIR = $(SRCDIR)/../compat/tcl-8.6
100
101 #### The Tcl source code directory. This defaults to the same value as
102 # TCLDIR macro (above), which may not be correct. This value will
103 # only be used if the FOSSIL_TCL_SOURCE macro is defined.
104 #
105
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -94,11 +94,11 @@
9494
# here is to use the Sysinternals junction tool to create a hard
9595
# link between a "tcl-8.x" sub-directory of the Fossil source code
9696
# directory and the target Tcl directory. This removes the need to
9797
# hard-code the necessary paths in this Makefile.
9898
#
99
-TCLDIR = $(SRCDIR)/../tcl-8.6
99
+TCLDIR = $(SRCDIR)/../compat/tcl-8.6
100100
101101
#### The Tcl source code directory. This defaults to the same value as
102102
# TCLDIR macro (above), which may not be correct. This value will
103103
# only be used if the FOSSIL_TCL_SOURCE macro is defined.
104104
#
105105
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -94,11 +94,11 @@
94 # here is to use the Sysinternals junction tool to create a hard
95 # link between a "tcl-8.x" sub-directory of the Fossil source code
96 # directory and the target Tcl directory. This removes the need to
97 # hard-code the necessary paths in this Makefile.
98 #
99 TCLDIR = $(SRCDIR)/../tcl-8.6
100
101 #### The Tcl source code directory. This defaults to the same value as
102 # TCLDIR macro (above), which may not be correct. This value will
103 # only be used if the FOSSIL_TCL_SOURCE macro is defined.
104 #
105
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -94,11 +94,11 @@
94 # here is to use the Sysinternals junction tool to create a hard
95 # link between a "tcl-8.x" sub-directory of the Fossil source code
96 # directory and the target Tcl directory. This removes the need to
97 # hard-code the necessary paths in this Makefile.
98 #
99 TCLDIR = $(SRCDIR)/../compat/tcl-8.6
100
101 #### The Tcl source code directory. This defaults to the same value as
102 # TCLDIR macro (above), which may not be correct. This value will
103 # only be used if the FOSSIL_TCL_SOURCE macro is defined.
104 #
105

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button