diff options
author | drh <drh@noemail.net> | 2015-05-04 20:25:05 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-05-04 20:25:05 +0000 |
commit | a3ab9d0c6187230290cf8063e98d13c866224f13 (patch) | |
tree | d6d3939c1c8fdf490996d4f14e90100dcf1d7806 /src/main.c | |
parent | d1055b1bd52c7d6c810a8179106444d8fa555765 (diff) | |
download | sqlite-a3ab9d0c6187230290cf8063e98d13c866224f13.tar.gz sqlite-a3ab9d0c6187230290cf8063e98d13c866224f13.zip |
Automatically enable the dbstat virtual table on all new database
connections with the SQLITE_ENABLE_DBSTAT_VTAB compile-time option is used.
FossilOrigin-Name: 1c9c6eaa9f75fd7b90fbf8b057656fd9e50b5060
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 69365b784..cc819c3fa 100644 --- a/src/main.c +++ b/src/main.c @@ -2876,6 +2876,13 @@ static int openDatabase( } #endif +#ifdef SQLITE_ENABLE_DBSTAT_VTAB + if( !db->mallocFailed && rc==SQLITE_OK){ + int sqlite3_dbstat_register(sqlite3*); + rc = sqlite3_dbstat_register(db); + } +#endif + /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking ** mode. -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking ** mode. Doing nothing at all also makes NORMAL the default. |