Add code to the shell to optionally initialize the dbstat virtual table.

FossilOrigin-Name: 7ed86dd3b85ee092a19fe5d1e2fba39ce0166a2a
This commit is contained in:
drh 2015-04-28 12:27:22 +00:00
parent 42c0a2b2f3
commit 06d83377e1
3 changed files with 16 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Fix\scomment\stypos.\s\sNo\scode\schanges.
D 2015-04-28T01:28:36.504
C Add\scode\sto\sthe\sshell\sto\soptionally\sinitialize\sthe\sdbstat\svirtual\stable.
D 2015-04-28T12:27:22.858
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in e3268d234210842b4be0a6e2e1c5990999f1d9f4
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -231,7 +231,7 @@ F src/random.c ba2679f80ec82c4190062d756f22d0c358180696
F src/resolve.c 13109bc3b5ab404446296efa17039640de5bc35d
F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e
F src/select.c 35433ea8894ac42594ddc31eb0165a6d6401cfe5
F src/shell.c 78eabce4c16c45e36fea2368f95118116399ba8a
F src/shell.c 5e74f4990d1f72350f90072aba233f81470489da
F src/sqlite.h.in ca27603a36fcacdaac5a19d8ee35aaff8ce8516f
F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad
F src/sqlite3ext.h 17d487c3c91b0b8c584a32fbeb393f6f795eea7d
@ -1255,7 +1255,10 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P fdc79fd14af8e05d1d5b4665303715b391f2e402
R 55049d2c3047e3692a4e24bc838bfe6a
P 60174cf572f8788e67a0434d5fe763724d7425a3
R f2e93bdadb8991149e736b946e2df1ef
T *branch * stat-vtab-in-shell
T *sym-stat-vtab-in-shell *
T -sym-trunk *
U drh
Z ca9d059cba96e027902a4d242e38e726
Z 12b2220a0d9de92a2a3793cfeeaeee37

View File

@ -1 +1 @@
60174cf572f8788e67a0434d5fe763724d7425a3
7ed86dd3b85ee092a19fe5d1e2fba39ce0166a2a

View File

@ -1909,6 +1909,12 @@ static void open_db(ShellState *p, int keepAlive){
if( p->db==0 ){
sqlite3_initialize();
sqlite3_open(p->zDbFilename, &p->db);
#ifdef SQLITE_ENABLE_STAT_VTAB_EXPERIMENTAL
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,