/ Check-in [d7f55c62]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:If the ".open" command fails in the CLI, reopen to :memory: so that at least some database is available for subsequent commands.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d7f55c62c3fa053b9b930a044b60076a8278cbf679d8e5116b95f2ff19247f6b
User & Date: drh 2019-01-04 14:29:21
Context
2019-01-04
23:39
Give a meaningful error on an attempt to use UPSERT on a virtual table, rather than simply not working. check-in: fa98748f user: drh tags: trunk
14:29
If the ".open" command fails in the CLI, reopen to :memory: so that at least some database is available for subsequent commands. check-in: d7f55c62 user: drh tags: trunk
12:46
Remove debugging pragmas accidently left in by a prior change. check-in: 26275fc7 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

  3867   3867           break;
  3868   3868         }
  3869   3869       }
  3870   3870       globalDb = p->db;
  3871   3871       if( p->db==0 || SQLITE_OK!=sqlite3_errcode(p->db) ){
  3872   3872         utf8_printf(stderr,"Error: unable to open database \"%s\": %s\n",
  3873   3873             p->zDbFilename, sqlite3_errmsg(p->db));
  3874         -      if( openFlags & OPEN_DB_KEEPALIVE ) return;
         3874  +      if( openFlags & OPEN_DB_KEEPALIVE ){
         3875  +        sqlite3_open(":memory:", &p->db);
         3876  +        return;
         3877  +      }
  3875   3878         exit(1);
  3876   3879       }
  3877   3880   #ifndef SQLITE_OMIT_LOAD_EXTENSION
  3878   3881       sqlite3_enable_load_extension(p->db, 1);
  3879   3882   #endif
  3880   3883       sqlite3_fileio_init(p->db, 0, 0);
  3881   3884       sqlite3_shathree_init(p->db, 0, 0);