diff options
author | drh <drh@noemail.net> | 2015-12-02 20:40:26 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-12-02 20:40:26 +0000 |
commit | 1bb15fc973f5b1b472897095f629abcc663bd453 (patch) | |
tree | 4eda31846a69354eb5ba5ff9dc91602a18d942ac /src/shell.c | |
parent | 769dc6e2a22b3104583ad357b01f31a22e146a5c (diff) | |
parent | f7ce4291a94573cdb04e5f3fcf59ed9e69226479 (diff) | |
download | sqlite-1bb15fc973f5b1b472897095f629abcc663bd453.tar.gz sqlite-1bb15fc973f5b1b472897095f629abcc663bd453.zip |
Merge recent enhancements from trunk.
FossilOrigin-Name: d1a1278d7f3306536dc9cbd8fb300898f1e373e8
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c index 7822919ec..565b58eea 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1867,6 +1867,7 @@ static char zHelp[] = ".timeout MS Try opening locked tables for MS milliseconds\n" ".timer on|off Turn SQL timer on or off\n" ".trace FILE|off Output each SQL statement as it is run\n" + ".vfsinfo ?AUX? Information about the top-level VFS\n" ".vfsname ?AUX? Print the name of the VFS stack\n" ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" " Negative values right-justify\n" @@ -4348,6 +4349,20 @@ static int do_meta_command(char *zLine, ShellState *p){ sqlite3_libversion(), sqlite3_sourceid()); }else + if( c=='v' && strncmp(azArg[0], "vfsinfo", n)==0 ){ + const char *zDbName = nArg==2 ? azArg[1] : "main"; + sqlite3_vfs *pVfs; + if( p->db ){ + sqlite3_file_control(p->db, zDbName, SQLITE_FCNTL_VFS_POINTER, &pVfs); + if( pVfs ){ + fprintf(p->out, "vfs.zName = \"%s\"\n", pVfs->zName); + fprintf(p->out, "vfs.iVersion = %d\n", pVfs->iVersion); + fprintf(p->out, "vfs.szOsFile = %d\n", pVfs->szOsFile); + fprintf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname); + } + } + }else + if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){ const char *zDbName = nArg==2 ? azArg[1] : "main"; char *zVfsName = 0; |