Fossil SCM

Cherrypick 3 bug-fixes from SQLite trunk, discovered just after the SQLite 3.15 release, among them a fix to VACUUM to prevent it from running out of memory on very large databases See [http://www.sqlite.org/src/info/34a579141b2c5ac|34a579141b2c5ac] and [http://www.sqlite.org/src/info/fef4bb4bd9185ec8f|fef4bb4bd9185ec8f] (most likely, those 3 will be in SQLite 3.15.1, if ever released)

jan.nijtmans 2016-11-03 09:52 UTC branch-1.36
Commit 360694a797718c4b2ab92def5714e98cab70ea95
2 files changed +2 -2 +8 -5
+2 -2
--- Dockerfile
+++ Dockerfile
@@ -1,15 +1,15 @@
11
###
22
# Dockerfile for Fossil
33
###
4
-FROM fedora:23
4
+FROM fedora:24
55
66
### Now install some additional parts we will need for the build
77
RUN dnf update -y && dnf install -y gcc make zlib-devel openssl-devel tar && dnf clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil
88
99
### If you want to build "trunk", change the next line accordingly.
10
-ENV FOSSIL_INSTALL_VERSION release
10
+ENV FOSSIL_INSTALL_VERSION branch-1.36
1111
1212
RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx
1313
RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-load && make && make install
1414
RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx
1515
RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl --with-tcl-stubs --with-tcl-private-stubs
1616
--- Dockerfile
+++ Dockerfile
@@ -1,15 +1,15 @@
1 ###
2 # Dockerfile for Fossil
3 ###
4 FROM fedora:23
5
6 ### Now install some additional parts we will need for the build
7 RUN dnf update -y && dnf install -y gcc make zlib-devel openssl-devel tar && dnf clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil
8
9 ### If you want to build "trunk", change the next line accordingly.
10 ENV FOSSIL_INSTALL_VERSION release
11
12 RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx
13 RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-load && make && make install
14 RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx
15 RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl --with-tcl-stubs --with-tcl-private-stubs
16
--- Dockerfile
+++ Dockerfile
@@ -1,15 +1,15 @@
1 ###
2 # Dockerfile for Fossil
3 ###
4 FROM fedora:24
5
6 ### Now install some additional parts we will need for the build
7 RUN dnf update -y && dnf install -y gcc make zlib-devel openssl-devel tar && dnf clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil
8
9 ### If you want to build "trunk", change the next line accordingly.
10 ENV FOSSIL_INSTALL_VERSION branch-1.36
11
12 RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx
13 RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-load && make && make install
14 RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx
15 RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl --with-tcl-stubs --with-tcl-private-stubs
16
+8 -5
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -122354,11 +122354,11 @@
122354122354
}
122355122355
#endif
122356122356
122357122357
sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
122358122358
sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
122359
- sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF);
122359
+ sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL);
122360122360
122361122361
/* Begin a transaction and take an exclusive lock on the main database
122362122362
** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
122363122363
** to ensure that we do not try to change the page-size on a WAL database.
122364122364
*/
@@ -127537,10 +127537,11 @@
127537127537
Expr *pNew;
127538127538
Expr *pLeft = sqlite3ExprForVectorField(pParse, pExpr->pLeft, i);
127539127539
Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i);
127540127540
127541127541
pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight, 0);
127542
+ transferJoinMarkings(pNew, pExpr);
127542127543
idxNew = whereClauseInsert(pWC, pNew, TERM_DYNAMIC);
127543127544
exprAnalyze(pSrc, pWC, idxNew);
127544127545
}
127545127546
pTerm = &pWC->a[idxTerm];
127546127547
pTerm->wtFlags = TERM_CODED|TERM_VIRTUAL; /* Disable the original */
@@ -132640,17 +132641,19 @@
132640132641
pLevel->addrLikeRep);
132641132642
VdbeCoverage(v);
132642132643
}
132643132644
#endif
132644132645
if( pLevel->iLeftJoin ){
132646
+ int ws = pLoop->wsFlags;
132645132647
addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin); VdbeCoverage(v);
132646
- assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0
132647
- || (pLoop->wsFlags & WHERE_INDEXED)!=0 );
132648
- if( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 ){
132648
+ assert( (ws & WHERE_IDX_ONLY)==0 || (ws & WHERE_INDEXED)!=0 );
132649
+ if( (ws & WHERE_IDX_ONLY)==0 ){
132649132650
sqlite3VdbeAddOp1(v, OP_NullRow, pTabList->a[i].iCursor);
132650132651
}
132651
- if( pLoop->wsFlags & WHERE_INDEXED ){
132652
+ if( (ws & WHERE_INDEXED)
132653
+ || ((ws & WHERE_MULTI_OR) && pLevel->u.pCovidx)
132654
+ ){
132652132655
sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);
132653132656
}
132654132657
if( pLevel->op==OP_Return ){
132655132658
sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);
132656132659
}else{
132657132660
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -122354,11 +122354,11 @@
122354 }
122355 #endif
122356
122357 sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
122358 sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
122359 sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF);
122360
122361 /* Begin a transaction and take an exclusive lock on the main database
122362 ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
122363 ** to ensure that we do not try to change the page-size on a WAL database.
122364 */
@@ -127537,10 +127537,11 @@
127537 Expr *pNew;
127538 Expr *pLeft = sqlite3ExprForVectorField(pParse, pExpr->pLeft, i);
127539 Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i);
127540
127541 pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight, 0);
 
127542 idxNew = whereClauseInsert(pWC, pNew, TERM_DYNAMIC);
127543 exprAnalyze(pSrc, pWC, idxNew);
127544 }
127545 pTerm = &pWC->a[idxTerm];
127546 pTerm->wtFlags = TERM_CODED|TERM_VIRTUAL; /* Disable the original */
@@ -132640,17 +132641,19 @@
132640 pLevel->addrLikeRep);
132641 VdbeCoverage(v);
132642 }
132643 #endif
132644 if( pLevel->iLeftJoin ){
 
132645 addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin); VdbeCoverage(v);
132646 assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0
132647 || (pLoop->wsFlags & WHERE_INDEXED)!=0 );
132648 if( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 ){
132649 sqlite3VdbeAddOp1(v, OP_NullRow, pTabList->a[i].iCursor);
132650 }
132651 if( pLoop->wsFlags & WHERE_INDEXED ){
 
 
132652 sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);
132653 }
132654 if( pLevel->op==OP_Return ){
132655 sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);
132656 }else{
132657
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -122354,11 +122354,11 @@
122354 }
122355 #endif
122356
122357 sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
122358 sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
122359 sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL);
122360
122361 /* Begin a transaction and take an exclusive lock on the main database
122362 ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
122363 ** to ensure that we do not try to change the page-size on a WAL database.
122364 */
@@ -127537,10 +127537,11 @@
127537 Expr *pNew;
127538 Expr *pLeft = sqlite3ExprForVectorField(pParse, pExpr->pLeft, i);
127539 Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i);
127540
127541 pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight, 0);
127542 transferJoinMarkings(pNew, pExpr);
127543 idxNew = whereClauseInsert(pWC, pNew, TERM_DYNAMIC);
127544 exprAnalyze(pSrc, pWC, idxNew);
127545 }
127546 pTerm = &pWC->a[idxTerm];
127547 pTerm->wtFlags = TERM_CODED|TERM_VIRTUAL; /* Disable the original */
@@ -132640,17 +132641,19 @@
132641 pLevel->addrLikeRep);
132642 VdbeCoverage(v);
132643 }
132644 #endif
132645 if( pLevel->iLeftJoin ){
132646 int ws = pLoop->wsFlags;
132647 addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin); VdbeCoverage(v);
132648 assert( (ws & WHERE_IDX_ONLY)==0 || (ws & WHERE_INDEXED)!=0 );
132649 if( (ws & WHERE_IDX_ONLY)==0 ){
 
132650 sqlite3VdbeAddOp1(v, OP_NullRow, pTabList->a[i].iCursor);
132651 }
132652 if( (ws & WHERE_INDEXED)
132653 || ((ws & WHERE_MULTI_OR) && pLevel->u.pCovidx)
132654 ){
132655 sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);
132656 }
132657 if( pLevel->op==OP_Return ){
132658 sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);
132659 }else{
132660

Keyboard Shortcuts

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