1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add support for the SQLITE_SQLLOG_CONDITIONAL environment variable to the logging code in test_sqllog.c. When defined, logging is only performed if the "<database>-sqllog" file is present in the file system when the main database is opened.

FossilOrigin-Name: cab8126be9f63dd596719b12704ba77c128282bc
This commit is contained in:
dan
2015-11-12 20:12:51 +00:00
parent c2e0dd4ddd
commit d83f7ca114
9 changed files with 239 additions and 32 deletions

View File

@@ -220,6 +220,12 @@ int sqlite3_initialize(void){
if( sqlite3GlobalConfig.isInit==0 && sqlite3GlobalConfig.inProgress==0 ){
FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
sqlite3GlobalConfig.inProgress = 1;
#ifdef SQLITE_INIT_SQLLOG
{
extern void SQLITE_INIT_SQLLOG(void);
SQLITE_INIT_SQLLOG();
}
#endif
memset(pHash, 0, sizeof(sqlite3GlobalFunctions));
sqlite3RegisterGlobalFunctions();
if( sqlite3GlobalConfig.isPCacheInit==0 ){