Fossil SCM

[a138dc97fc]: Fix a potential segfault when the SSH_CONNECTION environment variable is defined. [http://www.sqlite.org/src/info/9d2ae6342c|9d2ae6342c]: In the command-line shell, run set writable_schema before running the ".clone" command.

jan.nijtmans 2014-04-22 09:43 UTC branch-1.28
Commit d7889a2e83c714dfc687030f21548041c23c19bd
+1
--- src/main.c
+++ src/main.c
@@ -1839,10 +1839,11 @@
18391839
18401840
/*
18411841
** Process all requests in a single SSH connection if possible.
18421842
*/
18431843
void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){
1844
+ blob_zero(&g.cgiIn);
18441845
do{
18451846
cgi_handle_ssh_http_request(zIpAddr);
18461847
process_one_web_page(0, FileGlob);
18471848
blob_reset(&g.cgiIn);
18481849
} while ( g.fSshClient & CGI_SSH_FOSSIL ||
18491850
--- src/main.c
+++ src/main.c
@@ -1839,10 +1839,11 @@
1839
1840 /*
1841 ** Process all requests in a single SSH connection if possible.
1842 */
1843 void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){
 
1844 do{
1845 cgi_handle_ssh_http_request(zIpAddr);
1846 process_one_web_page(0, FileGlob);
1847 blob_reset(&g.cgiIn);
1848 } while ( g.fSshClient & CGI_SSH_FOSSIL ||
1849
--- src/main.c
+++ src/main.c
@@ -1839,10 +1839,11 @@
1839
1840 /*
1841 ** Process all requests in a single SSH connection if possible.
1842 */
1843 void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){
1844 blob_zero(&g.cgiIn);
1845 do{
1846 cgi_handle_ssh_http_request(zIpAddr);
1847 process_one_web_page(0, FileGlob);
1848 blob_reset(&g.cgiIn);
1849 } while ( g.fSshClient & CGI_SSH_FOSSIL ||
1850
+1
--- src/main.c
+++ src/main.c
@@ -1839,10 +1839,11 @@
18391839
18401840
/*
18411841
** Process all requests in a single SSH connection if possible.
18421842
*/
18431843
void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){
1844
+ blob_zero(&g.cgiIn);
18441845
do{
18451846
cgi_handle_ssh_http_request(zIpAddr);
18461847
process_one_web_page(0, FileGlob);
18471848
blob_reset(&g.cgiIn);
18481849
} while ( g.fSshClient & CGI_SSH_FOSSIL ||
18491850
--- src/main.c
+++ src/main.c
@@ -1839,10 +1839,11 @@
1839
1840 /*
1841 ** Process all requests in a single SSH connection if possible.
1842 */
1843 void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){
 
1844 do{
1845 cgi_handle_ssh_http_request(zIpAddr);
1846 process_one_web_page(0, FileGlob);
1847 blob_reset(&g.cgiIn);
1848 } while ( g.fSshClient & CGI_SSH_FOSSIL ||
1849
--- src/main.c
+++ src/main.c
@@ -1839,10 +1839,11 @@
1839
1840 /*
1841 ** Process all requests in a single SSH connection if possible.
1842 */
1843 void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){
1844 blob_zero(&g.cgiIn);
1845 do{
1846 cgi_handle_ssh_http_request(zIpAddr);
1847 process_one_web_page(0, FileGlob);
1848 blob_reset(&g.cgiIn);
1849 } while ( g.fSshClient & CGI_SSH_FOSSIL ||
1850
+5 -2
--- src/shell.c
+++ src/shell.c
@@ -2130,14 +2130,16 @@
21302130
rc = sqlite3_open(zNewDb, &newDb);
21312131
if( rc ){
21322132
fprintf(stderr, "Cannot create output database: %s\n",
21332133
sqlite3_errmsg(newDb));
21342134
}else{
2135
+ sqlite3_exec(p->db, "PRAGMA writable_schema=ON;", 0, 0, 0);
21352136
sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
21362137
tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
21372138
tryToCloneSchema(p, newDb, "type!='table'", 0);
21382139
sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);
2140
+ sqlite3_exec(p->db, "PRAGMA writable_schema=OFF;", 0, 0, 0);
21392141
}
21402142
sqlite3_close(newDb);
21412143
}
21422144
21432145
/*
@@ -3065,13 +3067,14 @@
30653067
azArg[1]);
30663068
}
30673069
break;
30683070
30693071
/* sqlite3_test_control(int) */
3070
- case SQLITE_TESTCTRL_PRNG_SAVE:
3071
- case SQLITE_TESTCTRL_PRNG_RESTORE:
3072
+ case SQLITE_TESTCTRL_PRNG_SAVE:
3073
+ case SQLITE_TESTCTRL_PRNG_RESTORE:
30723074
case SQLITE_TESTCTRL_PRNG_RESET:
3075
+ case SQLITE_TESTCTRL_BYTEORDER:
30733076
if( nArg==2 ){
30743077
rc = sqlite3_test_control(testctrl);
30753078
fprintf(p->out, "%d (0x%08x)\n", rc, rc);
30763079
} else {
30773080
fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
30783081
--- src/shell.c
+++ src/shell.c
@@ -2130,14 +2130,16 @@
2130 rc = sqlite3_open(zNewDb, &newDb);
2131 if( rc ){
2132 fprintf(stderr, "Cannot create output database: %s\n",
2133 sqlite3_errmsg(newDb));
2134 }else{
 
2135 sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
2136 tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
2137 tryToCloneSchema(p, newDb, "type!='table'", 0);
2138 sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);
 
2139 }
2140 sqlite3_close(newDb);
2141 }
2142
2143 /*
@@ -3065,13 +3067,14 @@
3065 azArg[1]);
3066 }
3067 break;
3068
3069 /* sqlite3_test_control(int) */
3070 case SQLITE_TESTCTRL_PRNG_SAVE:
3071 case SQLITE_TESTCTRL_PRNG_RESTORE:
3072 case SQLITE_TESTCTRL_PRNG_RESET:
 
3073 if( nArg==2 ){
3074 rc = sqlite3_test_control(testctrl);
3075 fprintf(p->out, "%d (0x%08x)\n", rc, rc);
3076 } else {
3077 fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
3078
--- src/shell.c
+++ src/shell.c
@@ -2130,14 +2130,16 @@
2130 rc = sqlite3_open(zNewDb, &newDb);
2131 if( rc ){
2132 fprintf(stderr, "Cannot create output database: %s\n",
2133 sqlite3_errmsg(newDb));
2134 }else{
2135 sqlite3_exec(p->db, "PRAGMA writable_schema=ON;", 0, 0, 0);
2136 sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
2137 tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
2138 tryToCloneSchema(p, newDb, "type!='table'", 0);
2139 sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);
2140 sqlite3_exec(p->db, "PRAGMA writable_schema=OFF;", 0, 0, 0);
2141 }
2142 sqlite3_close(newDb);
2143 }
2144
2145 /*
@@ -3065,13 +3067,14 @@
3067 azArg[1]);
3068 }
3069 break;
3070
3071 /* sqlite3_test_control(int) */
3072 case SQLITE_TESTCTRL_PRNG_SAVE:
3073 case SQLITE_TESTCTRL_PRNG_RESTORE:
3074 case SQLITE_TESTCTRL_PRNG_RESET:
3075 case SQLITE_TESTCTRL_BYTEORDER:
3076 if( nArg==2 ){
3077 rc = sqlite3_test_control(testctrl);
3078 fprintf(p->out, "%d (0x%08x)\n", rc, rc);
3079 } else {
3080 fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
3081
+5 -2
--- src/shell.c
+++ src/shell.c
@@ -2130,14 +2130,16 @@
21302130
rc = sqlite3_open(zNewDb, &newDb);
21312131
if( rc ){
21322132
fprintf(stderr, "Cannot create output database: %s\n",
21332133
sqlite3_errmsg(newDb));
21342134
}else{
2135
+ sqlite3_exec(p->db, "PRAGMA writable_schema=ON;", 0, 0, 0);
21352136
sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
21362137
tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
21372138
tryToCloneSchema(p, newDb, "type!='table'", 0);
21382139
sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);
2140
+ sqlite3_exec(p->db, "PRAGMA writable_schema=OFF;", 0, 0, 0);
21392141
}
21402142
sqlite3_close(newDb);
21412143
}
21422144
21432145
/*
@@ -3065,13 +3067,14 @@
30653067
azArg[1]);
30663068
}
30673069
break;
30683070
30693071
/* sqlite3_test_control(int) */
3070
- case SQLITE_TESTCTRL_PRNG_SAVE:
3071
- case SQLITE_TESTCTRL_PRNG_RESTORE:
3072
+ case SQLITE_TESTCTRL_PRNG_SAVE:
3073
+ case SQLITE_TESTCTRL_PRNG_RESTORE:
30723074
case SQLITE_TESTCTRL_PRNG_RESET:
3075
+ case SQLITE_TESTCTRL_BYTEORDER:
30733076
if( nArg==2 ){
30743077
rc = sqlite3_test_control(testctrl);
30753078
fprintf(p->out, "%d (0x%08x)\n", rc, rc);
30763079
} else {
30773080
fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
30783081
--- src/shell.c
+++ src/shell.c
@@ -2130,14 +2130,16 @@
2130 rc = sqlite3_open(zNewDb, &newDb);
2131 if( rc ){
2132 fprintf(stderr, "Cannot create output database: %s\n",
2133 sqlite3_errmsg(newDb));
2134 }else{
 
2135 sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
2136 tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
2137 tryToCloneSchema(p, newDb, "type!='table'", 0);
2138 sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);
 
2139 }
2140 sqlite3_close(newDb);
2141 }
2142
2143 /*
@@ -3065,13 +3067,14 @@
3065 azArg[1]);
3066 }
3067 break;
3068
3069 /* sqlite3_test_control(int) */
3070 case SQLITE_TESTCTRL_PRNG_SAVE:
3071 case SQLITE_TESTCTRL_PRNG_RESTORE:
3072 case SQLITE_TESTCTRL_PRNG_RESET:
 
3073 if( nArg==2 ){
3074 rc = sqlite3_test_control(testctrl);
3075 fprintf(p->out, "%d (0x%08x)\n", rc, rc);
3076 } else {
3077 fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
3078
--- src/shell.c
+++ src/shell.c
@@ -2130,14 +2130,16 @@
2130 rc = sqlite3_open(zNewDb, &newDb);
2131 if( rc ){
2132 fprintf(stderr, "Cannot create output database: %s\n",
2133 sqlite3_errmsg(newDb));
2134 }else{
2135 sqlite3_exec(p->db, "PRAGMA writable_schema=ON;", 0, 0, 0);
2136 sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
2137 tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
2138 tryToCloneSchema(p, newDb, "type!='table'", 0);
2139 sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);
2140 sqlite3_exec(p->db, "PRAGMA writable_schema=OFF;", 0, 0, 0);
2141 }
2142 sqlite3_close(newDb);
2143 }
2144
2145 /*
@@ -3065,13 +3067,14 @@
3067 azArg[1]);
3068 }
3069 break;
3070
3071 /* sqlite3_test_control(int) */
3072 case SQLITE_TESTCTRL_PRNG_SAVE:
3073 case SQLITE_TESTCTRL_PRNG_RESTORE:
3074 case SQLITE_TESTCTRL_PRNG_RESET:
3075 case SQLITE_TESTCTRL_BYTEORDER:
3076 if( nArg==2 ){
3077 rc = sqlite3_test_control(testctrl);
3078 fprintf(p->out, "%d (0x%08x)\n", rc, rc);
3079 } else {
3080 fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
3081
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,14 +19,20 @@
1919
* [1c39f113d1]: Crash on STASH DIFF command.
2020
* [b4dffdac5e]: Avoid unnecessary no-op write transactions on the server
2121
during a pull.
2222
* [3fbdaa243d]: Speedup "fossil extras" and other commands which traverse
2323
the local filesystem.
24
- * [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
25
- correctly handle NextIfOpen and PrevIfOpen opcodes.
2624
* [684eb478e7]: Fix the SCGI processing so that it works with Nginx.
2725
* [ee1aa460a4]: Fix using the unary bitwise NOT operator in TH1
26
+ * [f2ebd7e52d]: Make use of a recursive query capability (if available) to
27
+ replace the compute_ancestors() function with a single query.
28
+ * [a138dc97fc]: Fix a potential segfault when the SSH_CONNECTION environment
29
+ variable is defined.
30
+ * [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
31
+ correctly handle NextIfOpen and PrevIfOpen opcodes.
32
+ * [http://www.sqlite.org/src/info/9d2ae6342c|9d2ae6342c]: In the command-line
33
+ shell, run set writable_schema before running the ".clone" command.
2834
* [fc6bb93689]: Add the "httpize" TH1 command.
2935
3036
<h2>Changes For Version 1.28 (2014-01-27)</h2>
3137
* Enhance [/help?cmd=/reports | /reports] to support event type filtering.
3238
* When cloning a repository, the user name passed via the URL (if any)
3339
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,14 +19,20 @@
19 * [1c39f113d1]: Crash on STASH DIFF command.
20 * [b4dffdac5e]: Avoid unnecessary no-op write transactions on the server
21 during a pull.
22 * [3fbdaa243d]: Speedup "fossil extras" and other commands which traverse
23 the local filesystem.
24 * [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
25 correctly handle NextIfOpen and PrevIfOpen opcodes.
26 * [684eb478e7]: Fix the SCGI processing so that it works with Nginx.
27 * [ee1aa460a4]: Fix using the unary bitwise NOT operator in TH1
 
 
 
 
 
 
 
 
28 * [fc6bb93689]: Add the "httpize" TH1 command.
29
30 <h2>Changes For Version 1.28 (2014-01-27)</h2>
31 * Enhance [/help?cmd=/reports | /reports] to support event type filtering.
32 * When cloning a repository, the user name passed via the URL (if any)
33
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,14 +19,20 @@
19 * [1c39f113d1]: Crash on STASH DIFF command.
20 * [b4dffdac5e]: Avoid unnecessary no-op write transactions on the server
21 during a pull.
22 * [3fbdaa243d]: Speedup "fossil extras" and other commands which traverse
23 the local filesystem.
 
 
24 * [684eb478e7]: Fix the SCGI processing so that it works with Nginx.
25 * [ee1aa460a4]: Fix using the unary bitwise NOT operator in TH1
26 * [f2ebd7e52d]: Make use of a recursive query capability (if available) to
27 replace the compute_ancestors() function with a single query.
28 * [a138dc97fc]: Fix a potential segfault when the SSH_CONNECTION environment
29 variable is defined.
30 * [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
31 correctly handle NextIfOpen and PrevIfOpen opcodes.
32 * [http://www.sqlite.org/src/info/9d2ae6342c|9d2ae6342c]: In the command-line
33 shell, run set writable_schema before running the ".clone" command.
34 * [fc6bb93689]: Add the "httpize" TH1 command.
35
36 <h2>Changes For Version 1.28 (2014-01-27)</h2>
37 * Enhance [/help?cmd=/reports | /reports] to support event type filtering.
38 * When cloning a repository, the user name passed via the URL (if any)
39
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,14 +19,20 @@
1919
* [1c39f113d1]: Crash on STASH DIFF command.
2020
* [b4dffdac5e]: Avoid unnecessary no-op write transactions on the server
2121
during a pull.
2222
* [3fbdaa243d]: Speedup "fossil extras" and other commands which traverse
2323
the local filesystem.
24
- * [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
25
- correctly handle NextIfOpen and PrevIfOpen opcodes.
2624
* [684eb478e7]: Fix the SCGI processing so that it works with Nginx.
2725
* [ee1aa460a4]: Fix using the unary bitwise NOT operator in TH1
26
+ * [f2ebd7e52d]: Make use of a recursive query capability (if available) to
27
+ replace the compute_ancestors() function with a single query.
28
+ * [a138dc97fc]: Fix a potential segfault when the SSH_CONNECTION environment
29
+ variable is defined.
30
+ * [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
31
+ correctly handle NextIfOpen and PrevIfOpen opcodes.
32
+ * [http://www.sqlite.org/src/info/9d2ae6342c|9d2ae6342c]: In the command-line
33
+ shell, run set writable_schema before running the ".clone" command.
2834
* [fc6bb93689]: Add the "httpize" TH1 command.
2935
3036
<h2>Changes For Version 1.28 (2014-01-27)</h2>
3137
* Enhance [/help?cmd=/reports | /reports] to support event type filtering.
3238
* When cloning a repository, the user name passed via the URL (if any)
3339
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,14 +19,20 @@
19 * [1c39f113d1]: Crash on STASH DIFF command.
20 * [b4dffdac5e]: Avoid unnecessary no-op write transactions on the server
21 during a pull.
22 * [3fbdaa243d]: Speedup "fossil extras" and other commands which traverse
23 the local filesystem.
24 * [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
25 correctly handle NextIfOpen and PrevIfOpen opcodes.
26 * [684eb478e7]: Fix the SCGI processing so that it works with Nginx.
27 * [ee1aa460a4]: Fix using the unary bitwise NOT operator in TH1
 
 
 
 
 
 
 
 
28 * [fc6bb93689]: Add the "httpize" TH1 command.
29
30 <h2>Changes For Version 1.28 (2014-01-27)</h2>
31 * Enhance [/help?cmd=/reports | /reports] to support event type filtering.
32 * When cloning a repository, the user name passed via the URL (if any)
33
--- www/changes.wiki
+++ www/changes.wiki
@@ -19,14 +19,20 @@
19 * [1c39f113d1]: Crash on STASH DIFF command.
20 * [b4dffdac5e]: Avoid unnecessary no-op write transactions on the server
21 during a pull.
22 * [3fbdaa243d]: Speedup "fossil extras" and other commands which traverse
23 the local filesystem.
 
 
24 * [684eb478e7]: Fix the SCGI processing so that it works with Nginx.
25 * [ee1aa460a4]: Fix using the unary bitwise NOT operator in TH1
26 * [f2ebd7e52d]: Make use of a recursive query capability (if available) to
27 replace the compute_ancestors() function with a single query.
28 * [a138dc97fc]: Fix a potential segfault when the SSH_CONNECTION environment
29 variable is defined.
30 * [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
31 correctly handle NextIfOpen and PrevIfOpen opcodes.
32 * [http://www.sqlite.org/src/info/9d2ae6342c|9d2ae6342c]: In the command-line
33 shell, run set writable_schema before running the ".clone" command.
34 * [fc6bb93689]: Add the "httpize" TH1 command.
35
36 <h2>Changes For Version 1.28 (2014-01-27)</h2>
37 * Enhance [/help?cmd=/reports | /reports] to support event type filtering.
38 * When cloning a repository, the user name passed via the URL (if any)
39

Keyboard Shortcuts

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