Fossil SCM

Suppress "database locked" warnings on the "PRAGMA optimize" that occurs as the process is shutting down.

jan.nijtmans 2017-04-23 14:50 trunk
Commit c7d85ffb2ac857b25ce95e640b44ecae73c5df05c2a72cc7cb87078e2ced4611
+1 -1
--- Dockerfile
+++ Dockerfile
@@ -5,11 +5,11 @@
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-2.2
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
@@ -5,11 +5,11 @@
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
@@ -5,11 +5,11 @@
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-2.2
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
+1 -1
--- Dockerfile
+++ Dockerfile
@@ -5,11 +5,11 @@
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-2.2
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
@@ -5,11 +5,11 @@
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
@@ -5,11 +5,11 @@
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-2.2
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
+1 -1
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1
-2.2
1
+2.2.1
22
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 2.2
2
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 2.2.1
2
+1 -1
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1
-2.2
1
+2.2.1
22
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 2.2
2
--- VERSION
+++ VERSION
@@ -1,1 +1,1 @@
1 2.2.1
2
+2
--- src/db.c
+++ src/db.c
@@ -1666,11 +1666,13 @@
16661666
while( db.pAllStmt ){
16671667
db_finalize(db.pAllStmt);
16681668
}
16691669
db_end_transaction(1);
16701670
pStmt = 0;
1671
+ g.dbIgnoreErrors++; /* Stop "database locked" warnings from PRAGMA optimize */
16711672
sqlite3_exec(g.db, "PRAGMA optimize", 0, 0, 0);
1673
+ g.dbIgnoreErrors--;
16721674
db_close_config();
16731675
16741676
/* If the localdb has a lot of unused free space,
16751677
** then VACUUM it as we shut down.
16761678
*/
16771679
--- src/db.c
+++ src/db.c
@@ -1666,11 +1666,13 @@
1666 while( db.pAllStmt ){
1667 db_finalize(db.pAllStmt);
1668 }
1669 db_end_transaction(1);
1670 pStmt = 0;
 
1671 sqlite3_exec(g.db, "PRAGMA optimize", 0, 0, 0);
 
1672 db_close_config();
1673
1674 /* If the localdb has a lot of unused free space,
1675 ** then VACUUM it as we shut down.
1676 */
1677
--- src/db.c
+++ src/db.c
@@ -1666,11 +1666,13 @@
1666 while( db.pAllStmt ){
1667 db_finalize(db.pAllStmt);
1668 }
1669 db_end_transaction(1);
1670 pStmt = 0;
1671 g.dbIgnoreErrors++; /* Stop "database locked" warnings from PRAGMA optimize */
1672 sqlite3_exec(g.db, "PRAGMA optimize", 0, 0, 0);
1673 g.dbIgnoreErrors--;
1674 db_close_config();
1675
1676 /* If the localdb has a lot of unused free space,
1677 ** then VACUUM it as we shut down.
1678 */
1679
+2 -2
--- src/export.c
+++ src/export.c
@@ -485,11 +485,10 @@
485485
**
486486
** See also: import
487487
*/
488488
void export_cmd(void){
489489
Stmt q, q2, q3;
490
- int i;
491490
Bag blobs, vers;
492491
unsigned int unused_mark = 1;
493492
const char *markfile_in;
494493
const char *markfile_out;
495494
@@ -509,10 +508,11 @@
509508
if( g.argc!=2 && g.argc!=3 ){ usage("--git ?REPOSITORY?"); }
510509
511510
db_multi_exec("CREATE TEMPORARY TABLE oldblob(rid INTEGER PRIMARY KEY)");
512511
db_multi_exec("CREATE TEMPORARY TABLE oldcommit(rid INTEGER PRIMARY KEY)");
513512
db_multi_exec("CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT)");
513
+ db_multi_exec("CREATE INDEX xmark_trid ON xmark(trid)");
514514
if( markfile_in!=0 ){
515515
Stmt qb,qc;
516516
FILE *f;
517517
int rid;
518518
@@ -718,11 +718,11 @@
718718
printf("\nfrom %s\n", zMark);
719719
free(zMark);
720720
printf("tagger");
721721
print_person(zUser);
722722
printf(" %s +0000\n", zSecSince1970);
723
- printf("data %d\n", zValue==NULL?0:strlen(zValue)+1);
723
+ printf("data %d\n", zValue==NULL?0:(int)strlen(zValue)+1);
724724
if( zValue!=NULL ) printf("%s\n",zValue);
725725
}
726726
db_finalize(&q);
727727
728728
if( markfile_out!=0 ){
729729
--- src/export.c
+++ src/export.c
@@ -485,11 +485,10 @@
485 **
486 ** See also: import
487 */
488 void export_cmd(void){
489 Stmt q, q2, q3;
490 int i;
491 Bag blobs, vers;
492 unsigned int unused_mark = 1;
493 const char *markfile_in;
494 const char *markfile_out;
495
@@ -509,10 +508,11 @@
509 if( g.argc!=2 && g.argc!=3 ){ usage("--git ?REPOSITORY?"); }
510
511 db_multi_exec("CREATE TEMPORARY TABLE oldblob(rid INTEGER PRIMARY KEY)");
512 db_multi_exec("CREATE TEMPORARY TABLE oldcommit(rid INTEGER PRIMARY KEY)");
513 db_multi_exec("CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT)");
 
514 if( markfile_in!=0 ){
515 Stmt qb,qc;
516 FILE *f;
517 int rid;
518
@@ -718,11 +718,11 @@
718 printf("\nfrom %s\n", zMark);
719 free(zMark);
720 printf("tagger");
721 print_person(zUser);
722 printf(" %s +0000\n", zSecSince1970);
723 printf("data %d\n", zValue==NULL?0:strlen(zValue)+1);
724 if( zValue!=NULL ) printf("%s\n",zValue);
725 }
726 db_finalize(&q);
727
728 if( markfile_out!=0 ){
729
--- src/export.c
+++ src/export.c
@@ -485,11 +485,10 @@
485 **
486 ** See also: import
487 */
488 void export_cmd(void){
489 Stmt q, q2, q3;
 
490 Bag blobs, vers;
491 unsigned int unused_mark = 1;
492 const char *markfile_in;
493 const char *markfile_out;
494
@@ -509,10 +508,11 @@
508 if( g.argc!=2 && g.argc!=3 ){ usage("--git ?REPOSITORY?"); }
509
510 db_multi_exec("CREATE TEMPORARY TABLE oldblob(rid INTEGER PRIMARY KEY)");
511 db_multi_exec("CREATE TEMPORARY TABLE oldcommit(rid INTEGER PRIMARY KEY)");
512 db_multi_exec("CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT)");
513 db_multi_exec("CREATE INDEX xmark_trid ON xmark(trid)");
514 if( markfile_in!=0 ){
515 Stmt qb,qc;
516 FILE *f;
517 int rid;
518
@@ -718,11 +718,11 @@
718 printf("\nfrom %s\n", zMark);
719 free(zMark);
720 printf("tagger");
721 print_person(zUser);
722 printf(" %s +0000\n", zSecSince1970);
723 printf("data %d\n", zValue==NULL?0:(int)strlen(zValue)+1);
724 if( zValue!=NULL ) printf("%s\n",zValue);
725 }
726 db_finalize(&q);
727
728 if( markfile_out!=0 ){
729
+2 -2
--- src/export.c
+++ src/export.c
@@ -485,11 +485,10 @@
485485
**
486486
** See also: import
487487
*/
488488
void export_cmd(void){
489489
Stmt q, q2, q3;
490
- int i;
491490
Bag blobs, vers;
492491
unsigned int unused_mark = 1;
493492
const char *markfile_in;
494493
const char *markfile_out;
495494
@@ -509,10 +508,11 @@
509508
if( g.argc!=2 && g.argc!=3 ){ usage("--git ?REPOSITORY?"); }
510509
511510
db_multi_exec("CREATE TEMPORARY TABLE oldblob(rid INTEGER PRIMARY KEY)");
512511
db_multi_exec("CREATE TEMPORARY TABLE oldcommit(rid INTEGER PRIMARY KEY)");
513512
db_multi_exec("CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT)");
513
+ db_multi_exec("CREATE INDEX xmark_trid ON xmark(trid)");
514514
if( markfile_in!=0 ){
515515
Stmt qb,qc;
516516
FILE *f;
517517
int rid;
518518
@@ -718,11 +718,11 @@
718718
printf("\nfrom %s\n", zMark);
719719
free(zMark);
720720
printf("tagger");
721721
print_person(zUser);
722722
printf(" %s +0000\n", zSecSince1970);
723
- printf("data %d\n", zValue==NULL?0:strlen(zValue)+1);
723
+ printf("data %d\n", zValue==NULL?0:(int)strlen(zValue)+1);
724724
if( zValue!=NULL ) printf("%s\n",zValue);
725725
}
726726
db_finalize(&q);
727727
728728
if( markfile_out!=0 ){
729729
--- src/export.c
+++ src/export.c
@@ -485,11 +485,10 @@
485 **
486 ** See also: import
487 */
488 void export_cmd(void){
489 Stmt q, q2, q3;
490 int i;
491 Bag blobs, vers;
492 unsigned int unused_mark = 1;
493 const char *markfile_in;
494 const char *markfile_out;
495
@@ -509,10 +508,11 @@
509 if( g.argc!=2 && g.argc!=3 ){ usage("--git ?REPOSITORY?"); }
510
511 db_multi_exec("CREATE TEMPORARY TABLE oldblob(rid INTEGER PRIMARY KEY)");
512 db_multi_exec("CREATE TEMPORARY TABLE oldcommit(rid INTEGER PRIMARY KEY)");
513 db_multi_exec("CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT)");
 
514 if( markfile_in!=0 ){
515 Stmt qb,qc;
516 FILE *f;
517 int rid;
518
@@ -718,11 +718,11 @@
718 printf("\nfrom %s\n", zMark);
719 free(zMark);
720 printf("tagger");
721 print_person(zUser);
722 printf(" %s +0000\n", zSecSince1970);
723 printf("data %d\n", zValue==NULL?0:strlen(zValue)+1);
724 if( zValue!=NULL ) printf("%s\n",zValue);
725 }
726 db_finalize(&q);
727
728 if( markfile_out!=0 ){
729
--- src/export.c
+++ src/export.c
@@ -485,11 +485,10 @@
485 **
486 ** See also: import
487 */
488 void export_cmd(void){
489 Stmt q, q2, q3;
 
490 Bag blobs, vers;
491 unsigned int unused_mark = 1;
492 const char *markfile_in;
493 const char *markfile_out;
494
@@ -509,10 +508,11 @@
508 if( g.argc!=2 && g.argc!=3 ){ usage("--git ?REPOSITORY?"); }
509
510 db_multi_exec("CREATE TEMPORARY TABLE oldblob(rid INTEGER PRIMARY KEY)");
511 db_multi_exec("CREATE TEMPORARY TABLE oldcommit(rid INTEGER PRIMARY KEY)");
512 db_multi_exec("CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT)");
513 db_multi_exec("CREATE INDEX xmark_trid ON xmark(trid)");
514 if( markfile_in!=0 ){
515 Stmt qb,qc;
516 FILE *f;
517 int rid;
518
@@ -718,11 +718,11 @@
718 printf("\nfrom %s\n", zMark);
719 free(zMark);
720 printf("tagger");
721 print_person(zUser);
722 printf(" %s +0000\n", zSecSince1970);
723 printf("data %d\n", zValue==NULL?0:(int)strlen(zValue)+1);
724 if( zValue!=NULL ) printf("%s\n",zValue);
725 }
726 db_finalize(&q);
727
728 if( markfile_out!=0 ){
729
+1 -1
--- src/gzip.c
+++ src/gzip.c
@@ -65,11 +65,11 @@
6565
if( now==-1 ){
6666
now = db_int64(0, "SELECT (julianday('now') - 2440587.5)*86400.0");
6767
}
6868
put32(&aHdr[4], now&0xffffffff);
6969
aHdr[8] = 2;
70
- aHdr[9] = 255;
70
+ aHdr[9] = -1;
7171
blob_append(&gzip.out, aHdr, 10);
7272
gzip.iCRC = 0;
7373
gzip.eState = 1;
7474
}
7575
7676
--- src/gzip.c
+++ src/gzip.c
@@ -65,11 +65,11 @@
65 if( now==-1 ){
66 now = db_int64(0, "SELECT (julianday('now') - 2440587.5)*86400.0");
67 }
68 put32(&aHdr[4], now&0xffffffff);
69 aHdr[8] = 2;
70 aHdr[9] = 255;
71 blob_append(&gzip.out, aHdr, 10);
72 gzip.iCRC = 0;
73 gzip.eState = 1;
74 }
75
76
--- src/gzip.c
+++ src/gzip.c
@@ -65,11 +65,11 @@
65 if( now==-1 ){
66 now = db_int64(0, "SELECT (julianday('now') - 2440587.5)*86400.0");
67 }
68 put32(&aHdr[4], now&0xffffffff);
69 aHdr[8] = 2;
70 aHdr[9] = -1;
71 blob_append(&gzip.out, aHdr, 10);
72 gzip.iCRC = 0;
73 gzip.eState = 1;
74 }
75
76
+1 -1
--- src/gzip.c
+++ src/gzip.c
@@ -65,11 +65,11 @@
6565
if( now==-1 ){
6666
now = db_int64(0, "SELECT (julianday('now') - 2440587.5)*86400.0");
6767
}
6868
put32(&aHdr[4], now&0xffffffff);
6969
aHdr[8] = 2;
70
- aHdr[9] = 255;
70
+ aHdr[9] = -1;
7171
blob_append(&gzip.out, aHdr, 10);
7272
gzip.iCRC = 0;
7373
gzip.eState = 1;
7474
}
7575
7676
--- src/gzip.c
+++ src/gzip.c
@@ -65,11 +65,11 @@
65 if( now==-1 ){
66 now = db_int64(0, "SELECT (julianday('now') - 2440587.5)*86400.0");
67 }
68 put32(&aHdr[4], now&0xffffffff);
69 aHdr[8] = 2;
70 aHdr[9] = 255;
71 blob_append(&gzip.out, aHdr, 10);
72 gzip.iCRC = 0;
73 gzip.eState = 1;
74 }
75
76
--- src/gzip.c
+++ src/gzip.c
@@ -65,11 +65,11 @@
65 if( now==-1 ){
66 now = db_int64(0, "SELECT (julianday('now') - 2440587.5)*86400.0");
67 }
68 put32(&aHdr[4], now&0xffffffff);
69 aHdr[8] = 2;
70 aHdr[9] = -1;
71 blob_append(&gzip.out, aHdr, 10);
72 gzip.iCRC = 0;
73 gzip.eState = 1;
74 }
75
76

Keyboard Shortcuts

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