Check-in [d7889a2e83]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[a138dc97fc]: Fix a potential segfault when the SSH_CONNECTION environment variable is defined. 9d2ae6342c: In the command-line shell, run set writable_schema before running the ".clone" command.
Timelines: family | ancestors | descendants | both | branch-1.28
Files: files | file ages | folders
SHA1: d7889a2e83c714dfc687030f21548041c23c19bd
User & Date: jan.nijtmans 2014-04-22 09:43:43.335
Context
2014-04-22
10:01
Make sure SQLITE_TESTCTRL_BYTEORDER is defined. Closed-Leaf check-in: 4778b1d07a user: jan.nijtmans tags: branch-1.28
09:43
[a138dc97fc]: Fix a potential segfault when the SSH_CONNECTION environment variable is defined. 9d2ae6342c: In the command-line shell, run set writable_schema before running the ".clone" command. check-in: d7889a2e83 user: jan.nijtmans tags: branch-1.28
2014-04-19
22:47
Fix a potential segfault when the SSH_CONNECTION environment variable is defined. check-in: a138dc97fc user: drh tags: trunk
2014-04-10
15:16
Cherry-pick [f2ebd7e52d16891bdbf2eb423891ad007e744f61|f2ebd7e52d]: Make use of a recursive query capability (if available) to replace the compute_ancestors() function with a single query. check-in: 52d8026045 user: jan.nijtmans tags: branch-1.28
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
1837
1838
1839
1840
1841
1842
1843

1844
1845
1846
1847
1848
1849
1850
  process_one_web_page(zNotFound, glob_create(zFileGlob));
}

/*
** Process all requests in a single SSH connection if possible.
*/
void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){

  do{
    cgi_handle_ssh_http_request(zIpAddr);
    process_one_web_page(0, FileGlob);
    blob_reset(&g.cgiIn);
  } while ( g.fSshClient & CGI_SSH_FOSSIL ||
          g.fSshClient & CGI_SSH_COMPAT );
}







>







1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
  process_one_web_page(zNotFound, glob_create(zFileGlob));
}

/*
** Process all requests in a single SSH connection if possible.
*/
void ssh_request_loop(const char *zIpAddr, Glob *FileGlob){
  blob_zero(&g.cgiIn);
  do{
    cgi_handle_ssh_http_request(zIpAddr);
    process_one_web_page(0, FileGlob);
    blob_reset(&g.cgiIn);
  } while ( g.fSshClient & CGI_SSH_FOSSIL ||
          g.fSshClient & CGI_SSH_COMPAT );
}
Changes to src/shell.c.
2128
2129
2130
2131
2132
2133
2134

2135
2136
2137
2138

2139
2140
2141
2142
2143
2144
2145
    return;
  }
  rc = sqlite3_open(zNewDb, &newDb);
  if( rc ){
    fprintf(stderr, "Cannot create output database: %s\n",
            sqlite3_errmsg(newDb));
  }else{

    sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
    tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
    tryToCloneSchema(p, newDb, "type!='table'", 0);
    sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);

  }
  sqlite3_close(newDb);
}

/*
** If an input line begins with "." then invoke this routine to
** process that line.







>




>







2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
    return;
  }
  rc = sqlite3_open(zNewDb, &newDb);
  if( rc ){
    fprintf(stderr, "Cannot create output database: %s\n",
            sqlite3_errmsg(newDb));
  }else{
    sqlite3_exec(p->db, "PRAGMA writable_schema=ON;", 0, 0, 0);
    sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
    tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
    tryToCloneSchema(p, newDb, "type!='table'", 0);
    sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);
    sqlite3_exec(p->db, "PRAGMA writable_schema=OFF;", 0, 0, 0);
  }
  sqlite3_close(newDb);
}

/*
** If an input line begins with "." then invoke this routine to
** process that line.
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072

3073
3074
3075
3076
3077
3078
3079
          } else {
            fprintf(stderr,"Error: testctrl %s takes a single int option\n",
                    azArg[1]);
          }
          break;

        /* sqlite3_test_control(int) */
        case SQLITE_TESTCTRL_PRNG_SAVE:           
        case SQLITE_TESTCTRL_PRNG_RESTORE:        
        case SQLITE_TESTCTRL_PRNG_RESET:

          if( nArg==2 ){
            rc = sqlite3_test_control(testctrl);
            fprintf(p->out, "%d (0x%08x)\n", rc, rc);
          } else {
            fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
          }
          break;







|
|

>







3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
          } else {
            fprintf(stderr,"Error: testctrl %s takes a single int option\n",
                    azArg[1]);
          }
          break;

        /* sqlite3_test_control(int) */
        case SQLITE_TESTCTRL_PRNG_SAVE:
        case SQLITE_TESTCTRL_PRNG_RESTORE:
        case SQLITE_TESTCTRL_PRNG_RESET:
        case SQLITE_TESTCTRL_BYTEORDER:
          if( nArg==2 ){
            rc = sqlite3_test_control(testctrl);
            fprintf(p->out, "%d (0x%08x)\n", rc, rc);
          } else {
            fprintf(stderr,"Error: testctrl %s takes no options\n", azArg[1]);
          }
          break;
Changes to www/changes.wiki.
17
18
19
20
21
22
23






24
25
26

27
28
29
30
31
32
33
34
  *  [d8a588ba76]: Fix checking for "clearsign" option in "fossil branch"
     command.
  *  [1c39f113d1]: Crash on STASH DIFF command.
  *  [b4dffdac5e]: Avoid unnecessary no-op write transactions on the server
     during a pull.
  *  [3fbdaa243d]: Speedup "fossil extras" and other commands which traverse
     the local filesystem.






  *  [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
     correctly handle NextIfOpen and PrevIfOpen opcodes.
  *  [684eb478e7]: Fix the SCGI processing so that it works with Nginx.

  *  [ee1aa460a4]: Fix using the unary bitwise NOT operator in TH1
  *  [fc6bb93689]: Add the "httpize" TH1 command.

<h2>Changes For Version 1.28 (2014-01-27)</h2>
  *  Enhance [/help?cmd=/reports | /reports] to support event type filtering.
  *  When cloning a repository, the user name passed via the URL (if any)
     is now used as the default local admin user's name.
  *  Enhance the SSH transport mechanism so that it runs a single instance of







>
>
>
>
>
>


<
>
|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

32
33
34
35
36
37
38
39
40
  *  [d8a588ba76]: Fix checking for "clearsign" option in "fossil branch"
     command.
  *  [1c39f113d1]: Crash on STASH DIFF command.
  *  [b4dffdac5e]: Avoid unnecessary no-op write transactions on the server
     during a pull.
  *  [3fbdaa243d]: Speedup "fossil extras" and other commands which traverse
     the local filesystem.
  *  [684eb478e7]: Fix the SCGI processing so that it works with Nginx.
  *  [ee1aa460a4]: Fix using the unary bitwise NOT operator in TH1
  *  [f2ebd7e52d]: Make use of a recursive query capability (if available) to
     replace the compute_ancestors() function with a single query.
  *  [a138dc97fc]: Fix a potential segfault when the SSH_CONNECTION environment
     variable is defined.
  *  [bfdabaecc8]: Fix the EXPLAIN indenter in the command-line shell to
     correctly handle NextIfOpen and PrevIfOpen opcodes.

  *  [http://www.sqlite.org/src/info/9d2ae6342c|9d2ae6342c]: In the command-line
     shell, run set writable_schema before running the ".clone" command.
  *  [fc6bb93689]: Add the "httpize" TH1 command.

<h2>Changes For Version 1.28 (2014-01-27)</h2>
  *  Enhance [/help?cmd=/reports | /reports] to support event type filtering.
  *  When cloning a repository, the user name passed via the URL (if any)
     is now used as the default local admin user's name.
  *  Enhance the SSH transport mechanism so that it runs a single instance of