/ Check-in [4fe5b731]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Amplify the restriction on commit-hooks that they cannot recursively run SQL on the same database connection.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4fe5b73115a8b44950767f1b528107261d7312c9
User & Date: drh 2011-11-07 17:54:26
Context
2011-11-07
18:16
Make the unix VFS tolerant of read() calls that return less than the requested number of bytes. check-in: a210695a user: drh tags: trunk
17:54
Amplify the restriction on commit-hooks that they cannot recursively run SQL on the same database connection. check-in: 4fe5b731 user: drh tags: trunk
16:46
Add a makefile target for tclsqlite3.c to Makefile.in. check-in: f521b6b7 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

  4397   4397   ** then the commit is converted into a rollback.
  4398   4398   **
  4399   4399   ** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions
  4400   4400   ** return the P argument from the previous call of the same function
  4401   4401   ** on the same [database connection] D, or NULL for
  4402   4402   ** the first call for each function on D.
  4403   4403   **
         4404  +** The commit and rollback hook callbacks are not reentrant.
  4404   4405   ** The callback implementation must not do anything that will modify
  4405   4406   ** the database connection that invoked the callback.  Any actions
  4406   4407   ** to modify the database connection must be deferred until after the
  4407   4408   ** completion of the [sqlite3_step()] call that triggered the commit
  4408   4409   ** or rollback hook in the first place.
  4409         -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
  4410         -** database connections for the meaning of "modify" in this paragraph.
         4410  +** Note that running any other SQL statements, including SELECT statements,
         4411  +** or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify
         4412  +** the database connections for the meaning of "modify" in this paragraph.
  4411   4413   **
  4412   4414   ** ^Registering a NULL function disables the callback.
  4413   4415   **
  4414   4416   ** ^When the commit hook callback routine returns zero, the [COMMIT]
  4415   4417   ** operation is allowed to continue normally.  ^If the commit hook
  4416   4418   ** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].
  4417   4419   ** ^The rollback hook is invoked on a rollback that results from a commit