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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user