SQLite

Check-in [d7f55c62]
Login

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 Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

3867
3868
3869
3870
3871
3872
3873
3874



3875
3876
3877
3878
3879
3880
3881
        break;
      }
    }
    globalDb = p->db;
    if( p->db==0 || SQLITE_OK!=sqlite3_errcode(p->db) ){
      utf8_printf(stderr,"Error: unable to open database \"%s\": %s\n",
          p->zDbFilename, sqlite3_errmsg(p->db));
      if( openFlags & OPEN_DB_KEEPALIVE ) return;



      exit(1);
    }
#ifndef SQLITE_OMIT_LOAD_EXTENSION
    sqlite3_enable_load_extension(p->db, 1);
#endif
    sqlite3_fileio_init(p->db, 0, 0);
    sqlite3_shathree_init(p->db, 0, 0);







|
>
>
>







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