/ Check-in [5727562b]
Login

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

Overview
Comment:Add the ".vfslist" command to the command-line shell.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5727562b75edf25102cd72607c420d245379c96d
User & Date: drh 2016-01-12 19:37:20
Context
2016-01-12
19:45
Add the "detail" option to fts5. Used to reduce the amount of information stored in an fts5 index. check-in: a220e85f user: dan tags: trunk
19:37
Add the ".vfslist" command to the command-line shell. check-in: 5727562b user: drh tags: trunk
14:10
Fix a harmless use of an uninitialized variable following system errors in the multi-threaded sorter. check-in: 4bb2c1df user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

  1917   1917     ".tables ?TABLE?        List names of tables\n"
  1918   1918     "                         If TABLE specified, only list tables matching\n"
  1919   1919     "                         LIKE pattern TABLE.\n"
  1920   1920     ".timeout MS            Try opening locked tables for MS milliseconds\n"
  1921   1921     ".timer on|off          Turn SQL timer on or off\n"
  1922   1922     ".trace FILE|off        Output each SQL statement as it is run\n"
  1923   1923     ".vfsinfo ?AUX?         Information about the top-level VFS\n"
         1924  +  ".vfslist               List all available VFSes\n"
  1924   1925     ".vfsname ?AUX?         Print the name of the VFS stack\n"
  1925   1926     ".width NUM1 NUM2 ...   Set column widths for \"column\" mode\n"
  1926   1927     "                         Negative values right-justify\n"
  1927   1928   ;
  1928   1929   
  1929   1930   /* Forward reference */
  1930   1931   static int process_input(ShellState *p, FILE *in);
................................................................................
  4163   4164         sqlite3_file_control(p->db, zDbName, SQLITE_FCNTL_VFS_POINTER, &pVfs);
  4164   4165         if( pVfs ){
  4165   4166           utf8_printf(p->out, "vfs.zName      = \"%s\"\n", pVfs->zName);
  4166   4167           raw_printf(p->out, "vfs.iVersion   = %d\n", pVfs->iVersion);
  4167   4168           raw_printf(p->out, "vfs.szOsFile   = %d\n", pVfs->szOsFile);
  4168   4169           raw_printf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname);
  4169   4170         }
         4171  +    }
         4172  +  }else
         4173  +
         4174  +  if( c=='v' && strncmp(azArg[0], "vfslist", n)==0 ){
         4175  +    sqlite3_vfs *pVfs;
         4176  +    sqlite3_vfs *pCurrent = 0;
         4177  +    if( p->db ){
         4178  +      sqlite3_file_control(p->db, "main", SQLITE_FCNTL_VFS_POINTER, &pCurrent);
         4179  +    }
         4180  +    for(pVfs=sqlite3_vfs_find(0); pVfs; pVfs=pVfs->pNext){
         4181  +      utf8_printf(p->out, "vfs.zName      = \"%s\"%s\n", pVfs->zName,
         4182  +           pVfs==pCurrent ? "  <--- CURRENT" : "");
         4183  +      raw_printf(p->out, "vfs.iVersion   = %d\n", pVfs->iVersion);
         4184  +      raw_printf(p->out, "vfs.szOsFile   = %d\n", pVfs->szOsFile);
         4185  +      raw_printf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname);
         4186  +      if( pVfs->pNext ){
         4187  +        raw_printf(p->out, "-----------------------------------\n");
         4188  +      }
  4170   4189       }
  4171   4190     }else
  4172   4191   
  4173   4192     if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){
  4174   4193       const char *zDbName = nArg==2 ? azArg[1] : "main";
  4175   4194       char *zVfsName = 0;
  4176   4195       if( p->db ){