aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-05-04 20:25:05 +0000
committerdrh <drh@noemail.net>2015-05-04 20:25:05 +0000
commita3ab9d0c6187230290cf8063e98d13c866224f13 (patch)
treed6d3939c1c8fdf490996d4f14e90100dcf1d7806 /src/main.c
parentd1055b1bd52c7d6c810a8179106444d8fa555765 (diff)
downloadsqlite-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.c7
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.