1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

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
This commit is contained in:
dan
2012-11-27 10:56:39 +00:00
parent ac45593931
commit 71ba10d3c9
5 changed files with 117 additions and 75 deletions

View File

@@ -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);