diff options
author | dan <dan@noemail.net> | 2012-11-27 10:56:39 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2012-11-27 10:56:39 +0000 |
commit | 71ba10d3c9e8f8c8137d0efaaa549f38f9a8233c (patch) | |
tree | 136f24c83f4e3601004e05b102cc9f5502e745b9 /src/main.c | |
parent | ac4559393136c11be004555abafef53f7e9a6b7a (diff) | |
download | sqlite-71ba10d3c9e8f8c8137d0efaaa549f38f9a8233c.tar.gz sqlite-71ba10d3c9e8f8c8137d0efaaa549f38f9a8233c.zip |
Fix problems in test_sqllog.c. Clarify the experimental SQLITE_CONFIG_SQLLOG interface. Handle at least the more likely error conditions in test_sqllog.c.
FossilOrigin-Name: 429c5b2056d7b7c644ca53bc97b8e0b9cb89ab04
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c index 7ef10605b..b52d47444 100644 --- a/src/main.c +++ b/src/main.c @@ -134,7 +134,7 @@ int sqlite3_initialize(void){ #ifdef SQLITE_ENABLE_SQLLOG { - extern sqlite3_init_sqllog(void); + extern void sqlite3_init_sqllog(void); sqlite3_init_sqllog(); } #endif @@ -837,7 +837,8 @@ static int sqlite3Close(sqlite3 *db, int forceZombie){ #ifdef SQLITE_ENABLE_SQLLOG if( sqlite3GlobalConfig.xSqllog ){ - sqlite3GlobalConfig.xSqllog(sqlite3GlobalConfig.pSqllogArg, db, 0, 0); + /* Closing the handle. Fourth parameter is passed the value 2. */ + sqlite3GlobalConfig.xSqllog(sqlite3GlobalConfig.pSqllogArg, db, 0, 2); } #endif @@ -2475,9 +2476,9 @@ opendb_out: *ppDb = db; #ifdef SQLITE_ENABLE_SQLLOG if( sqlite3GlobalConfig.xSqllog ){ - sqlite3GlobalConfig.xSqllog( - sqlite3GlobalConfig.pSqllogArg, db, zFilename, -1 - ); + /* Opening a db handle. Fourth parameter is passed 0. */ + void *pArg = sqlite3GlobalConfig.pSqllogArg; + sqlite3GlobalConfig.xSqllog(pArg, db, zFilename, 0); } #endif return sqlite3ApiExit(0, rc); |