1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +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:
drh
2010-05-05 20:00:25 +00:00
parent ccd13d1f80
commit 5def0843f1
8 changed files with 44 additions and 43 deletions

View File

@@ -5780,9 +5780,10 @@ void sqlite3_log(int iErrCode, const char *zFormat, ...);
** is the number of pages currently in the log file, including those that
** were just committed.
**
** If an invocation of the callback function returns non-zero, then a
** checkpoint is automatically run on the database. If zero is returned,
** no special action is taken.
** The callback function should normally return SQLITE_OK. If an error
** code is returned, that error will propagate back up through the
** SQLite code base to cause the statement that provoked the callback
** to fail.
**
** A single database handle may have at most a single log callback
** registered at one time. Calling [sqlite3_wal_hook()] replaces any