/ Check-in [dc2ac024]
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:Fix uninitialized variable in the command line shell.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dc2ac024d31a898bbc3e7fc824d806e63e993234
User & Date: mistachkin 2015-11-17 19:17:14
Context
2015-11-17
20:56
When using mmap mode on unix, use a read-only mapping by default. Write to the database file using write(). Unless SQLITE_MMAP_READWRITE is defined, in which case use a read/write mapping and write into the file using memcpy(). check-in: 67c5d3c6 user: dan tags: trunk
19:17
Fix uninitialized variable in the command line shell. check-in: dc2ac024 user: mistachkin tags: trunk
19:16
Fix harmless compiler warning. check-in: eea26b6c user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

  2556   2556        { "number of triggers:",
  2557   2557          "SELECT count(*) FROM %s WHERE type='trigger'" },
  2558   2558        { "number of views:",
  2559   2559          "SELECT count(*) FROM %s WHERE type='view'" },
  2560   2560        { "schema size:",
  2561   2561          "SELECT total(length(sql)) FROM %s" },
  2562   2562     };
  2563         -  sqlite3_file *pFile;
         2563  +  sqlite3_file *pFile = 0;
  2564   2564     int i;
  2565   2565     char *zSchemaTab;
  2566   2566     char *zDb = nArg>=2 ? azArg[1] : "main";
  2567   2567     unsigned char aHdr[100];
  2568   2568     open_db(p, 0);
  2569   2569     if( p->db==0 ) return 1;
  2570   2570     sqlite3_file_control(p->db, zDb, SQLITE_FCNTL_FILE_POINTER, &pFile);