From: drh Date: Thu, 30 Apr 2015 20:35:33 +0000 (+0000) Subject: Enhance the CLI to initialize the dbstat virtual table if compiled using X-Git-Tag: version-3.8.10~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6296a2ab4becde6e2b3519d0e0f88187212e517e;p=thirdparty%2Fsqlite.git Enhance the CLI to initialize the dbstat virtual table if compiled using SQLITE_ENABLE_STAT_VTAB. FossilOrigin-Name: 822dfc00173dad7703aa6413bb94f72f0da8e2c6 --- 6296a2ab4becde6e2b3519d0e0f88187212e517e diff --cc manifest index 5eea2795b0,44265ce51a..e5dd563b41 --- a/manifest +++ b/manifest @@@ -1,5 -1,5 +1,5 @@@ - C Fix\sa\sharmless\scomment\stypo. - D 2015-04-30T20:33:25.923 -C Add\scode\sto\sthe\sshell\sto\soptionally\sinitialize\sthe\sdbstat\svirtual\stable. -D 2015-04-28T12:27:22.858 ++C Enhance\sthe\sCLI\sto\sinitialize\sthe\sdbstat\svirtual\stable\sif\scompiled\susing\nSQLITE_ENABLE_STAT_VTAB. ++D 2015-04-30T20:35:33.318 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in e3268d234210842b4be0a6e2e1c5990999f1d9f4 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@@ -231,7 -231,7 +231,7 @@@ F src/random.c ba2679f80ec82c4190062d75 F src/resolve.c 13109bc3b5ab404446296efa17039640de5bc35d F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e F src/select.c 35433ea8894ac42594ddc31eb0165a6d6401cfe5 - F src/shell.c 1e5307902f021860edd5f5f4a28cda7924689dac -F src/shell.c 5e74f4990d1f72350f90072aba233f81470489da ++F src/shell.c 0b68e745dff6fc7b9f86c330d401fd572a5bbbc2 F src/sqlite.h.in ca27603a36fcacdaac5a19d8ee35aaff8ce8516f F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h 17d487c3c91b0b8c584a32fbeb393f6f795eea7d @@@ -1255,7 -1255,10 +1255,7 @@@ F tool/vdbe_profile.tcl 67746953071a9f8 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f - P 9a9f633f035fc3f6484b2d8eeed937374f4558c4 - R 20bc5e89d0fcdb5543515f2ee3af3142 -P 60174cf572f8788e67a0434d5fe763724d7425a3 -R f2e93bdadb8991149e736b946e2df1ef -T *branch * stat-vtab-in-shell -T *sym-stat-vtab-in-shell * -T -sym-trunk * ++P 012a0c4e8485b1c2206ecff1946bf036bae04f3c 7ed86dd3b85ee092a19fe5d1e2fba39ce0166a2a ++R ce4ce0ea10f0361792c80aff76a3f2ab U drh - Z 7ac753d1cc4cbff953f0752b0a36c863 -Z 12b2220a0d9de92a2a3793cfeeaeee37 ++Z 7586895a6156132f56fe0bdc67703db2 diff --cc manifest.uuid index 70a9301c5d,31928e2aef..fe19fa791e --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - 012a0c4e8485b1c2206ecff1946bf036bae04f3c -7ed86dd3b85ee092a19fe5d1e2fba39ce0166a2a ++822dfc00173dad7703aa6413bb94f72f0da8e2c6 diff --cc src/shell.c index d9b48bb0b0,dbe652d48e..d8b537f424 --- a/src/shell.c +++ b/src/shell.c @@@ -1909,6 -1909,12 +1909,12 @@@ static void open_db(ShellState *p, int if( p->db==0 ){ sqlite3_initialize(); sqlite3_open(p->zDbFilename, &p->db); -#ifdef SQLITE_ENABLE_STAT_VTAB_EXPERIMENTAL ++#ifdef SQLITE_ENABLE_STAT_VTAB + if( p->db ){ + int sqlite3_dbstat_register(sqlite3*); + sqlite3_dbstat_register(p->db); + } + #endif globalDb = p->db; if( p->db && sqlite3_errcode(p->db)==SQLITE_OK ){ sqlite3_create_function(p->db, "shellstatic", 0, SQLITE_UTF8, 0,