diff options
author | drh <drh@noemail.net> | 2011-12-14 18:33:13 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-12-14 18:33:13 +0000 |
commit | a60ef3d570073cc78c066442d23ec7cd9453ee55 (patch) | |
tree | e5a0b0f22c5efb35424cd81ba7588436964df18a /src/shell.c | |
parent | 6ca514b075afe07eee51dbeb6910ab4022e567eb (diff) | |
parent | 0f2ab8db33f82743ea49b5b11e5f10a8923ed6fb (diff) | |
download | sqlite-a60ef3d570073cc78c066442d23ec7cd9453ee55.tar.gz sqlite-a60ef3d570073cc78c066442d23ec7cd9453ee55.zip |
Merge the nx-devkit changes into trunk. This includes the new
SQLITE_FCNTL_VFSNAME file-control.
FossilOrigin-Name: da118e02c0576ce16f7a26663f59413316223d55
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c index 911f6fad9..31d3dd8fc 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1405,6 +1405,7 @@ static char zHelp[] = " If TABLE specified, only list tables matching\n" " LIKE pattern TABLE.\n" ".timeout MS Try opening locked tables for MS milliseconds\n" + ".vfsname ?AUX? Print the name of the VFS stack\n" ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" ; @@ -2348,6 +2349,18 @@ static int do_meta_command(char *zLine, struct callback_data *p){ sqlite3_libversion(), sqlite3_sourceid()); }else + if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){ + const char *zDbName = nArg==2 ? azArg[1] : "main"; + char *zVfsName = 0; + if( p->db ){ + sqlite3_file_control(p->db, zDbName, SQLITE_FCNTL_VFSNAME, &zVfsName); + if( zVfsName ){ + printf("%s\n", zVfsName); + sqlite3_free(zVfsName); + } + } + }else + if( c=='w' && strncmp(azArg[0], "width", n)==0 && nArg>1 ){ int j; assert( nArg<=ArraySize(azArg) ); |