/ Check-in [de58cb28]
Login

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

Overview
Comment:Enable URI filenames in the command-line shell. Add a check to the beginning of the shell to make sure it is compiled with the same SQLite source and header.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: de58cb28387f44c35b1a81bdab853cafd938c1a6
User & Date: drh 2011-05-18 17:15:06
Context
2011-05-19
01:21
When committing a WAL transaction, make sure at least one page is written to the WAL file so that the WAL subsystem will have a page on which to set the commit flag. Ticket [2d1a5c67dfc236]. check-in: 67bf1c9a user: drh tags: trunk
2011-05-18
17:15
Enable URI filenames in the command-line shell. Add a check to the beginning of the shell to make sure it is compiled with the same SQLite source and header. check-in: de58cb28 user: drh tags: trunk
03:02
Make sure the multiplexor shim uses a full pathname for temp file that it creates. check-in: 186d7ff1 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

  2645   2645   ** Initialize the state information in data
  2646   2646   */
  2647   2647   static void main_init(struct callback_data *data) {
  2648   2648     memset(data, 0, sizeof(*data));
  2649   2649     data->mode = MODE_List;
  2650   2650     memcpy(data->separator,"|", 2);
  2651   2651     data->showHeader = 0;
         2652  +  sqlite3_config(SQLITE_CONFIG_URI, 1);
  2652   2653     sqlite3_config(SQLITE_CONFIG_LOG, shellLog, data);
  2653   2654     sqlite3_snprintf(sizeof(mainPrompt), mainPrompt,"sqlite> ");
  2654   2655     sqlite3_snprintf(sizeof(continuePrompt), continuePrompt,"   ...> ");
  2655   2656     sqlite3_config(SQLITE_CONFIG_SINGLETHREAD);
  2656   2657   }
  2657   2658   
  2658   2659   int main(int argc, char **argv){
................................................................................
  2659   2660     char *zErrMsg = 0;
  2660   2661     struct callback_data data;
  2661   2662     const char *zInitFile = 0;
  2662   2663     char *zFirstCmd = 0;
  2663   2664     int i;
  2664   2665     int rc = 0;
  2665   2666   
         2667  +  if( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)!=0 ){
         2668  +    fprintf(stderr, "SQLite header and source version mismatch\n%s\n%s\n",
         2669  +            sqlite3_sourceid(), SQLITE_SOURCE_ID);
         2670  +    exit(1);
         2671  +  }
  2666   2672     Argv0 = argv[0];
  2667   2673     main_init(&data);
  2668   2674     stdin_is_interactive = isatty(0);
  2669   2675   
  2670   2676     /* Make sure we have a valid signal handler early, before anything
  2671   2677     ** else is done.
  2672   2678     */