1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

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

@@ -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,