On 07/14/2017 08:55 PM, Peter da Silva wrote:
In wal_hook we have:

** 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 report an error, though the commit will have still occurred. If the
** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value
** that does not correspond to any valid SQLite error code, the results
** are undefined.

The Tcl interface doesn’t specify whether this maps to a successful return (ie, 
returning TCL_OK) with any errors propagated by the Tcl error mechanism (ie, 
returning TCL_ERROR), or whether the wal_hook routine needs to return SQLITE_OK 
(0). Examination of tea/generic/tclsqlite3.c indicates that it’s the latter. If 
you don’t want to invoke nasal demons, you probably need to end the hook with 
“return 0”.

Documentation should probably make this explicit on the Tcl interface page.

Thanks for pointing this out. This change will be published to the website when 3.20.0 is released:

  http://sqlite.org/docsrc/info/356a4d46878a1039

Dan.


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to