1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

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
This commit is contained in:
drh
2015-05-04 20:25:05 +00:00
parent d1055b1bd5
commit a3ab9d0c61
4 changed files with 15 additions and 15 deletions

View File

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