aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeapi.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-05-05 20:00:25 +0000
committerdrh <drh@noemail.net>2010-05-05 20:00:25 +0000
commit5def0843f1075f85494b63ed326c7061dd5420a8 (patch)
tree8981f28de1016fa4fe20a47825745b60a9c701e8 /src/vdbeapi.c
parentccd13d1f80b3036d63d78c3d8b8bf70a70f200ff (diff)
downloadsqlite-5def0843f1075f85494b63ed326c7061dd5420a8.tar.gz
sqlite-5def0843f1075f85494b63ed326c7061dd5420a8.zip
Change the behavior of the sqlite3_wal_hook() callback. It should now return
SQLITE_OK or an error code and the error code is propagated back up the stack. If a checkpoint is desired, the callback should invoke sqlite3_wal_callback() itself. FossilOrigin-Name: 1b14195e05fe5551992a39246ec3bcf6a33bbfac
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r--src/vdbeapi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 2a8c1dd18..2f5aaa36d 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -318,10 +318,8 @@ static int doWalCallbacks(sqlite3 *db){
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
int nEntry = sqlite3PagerWalCallback(sqlite3BtreePager(pBt));
- if( db->xWalCallback && nEntry>0 && rc==SQLITE_OK
- && db->xWalCallback(db->pWalArg, db, db->aDb[i].zName, nEntry)
- ){
- rc = sqlite3Checkpoint(db, i);
+ if( db->xWalCallback && nEntry>0 && rc==SQLITE_OK ){
+ rc = db->xWalCallback(db->pWalArg, db, db->aDb[i].zName, nEntry);
}
}
}