mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
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
This commit is contained in:
@ -49,7 +49,7 @@ do_test walhook-1.2 {
|
||||
set ::wal_hook
|
||||
} {main 5}
|
||||
do_test walhook-1.3 {
|
||||
proc wal_hook {args} { return 1 }
|
||||
proc wal_hook {args} { db eval {PRAGMA wal_checkpoint}; return 0 }
|
||||
execsql { INSERT INTO t1 VALUES(2, 'two') }
|
||||
file size test.db
|
||||
} [expr 3*1024]
|
||||
|
Reference in New Issue
Block a user