/ Check-in [1dfa5234]
Login

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

Overview
Comment:Update documentation for sqlite3_snapshot_open(). No code changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1dfa5234d3ee38c6af2d18a6294afa93232821e7
User & Date: drh 2016-04-08 19:44:31
Context
2016-04-09
14:36
Limit the number of digits shown in the "prereq" mask for ".wheretrace" debugging output. check-in: 3686ed74 user: drh tags: trunk
2016-04-08
21:35
Attempt to treat the arguments to a table-valued function as if they occur in the ON clause of a LEFT JOIN rather than in the WHERE clause. But this causes undesirable behavior with generate_series, as demonstrated by test cases. This is an incremental check-in pending further work. Leaf check-in: 00ac73a0 user: drh tags: tabfunc-in-left-join
19:44
Update documentation for sqlite3_snapshot_open(). No code changes. check-in: 1dfa5234 user: drh tags: trunk
2016-04-07
21:14
Add test cases for ticket [7f7f8026eda387d544]. check-in: 87aa9357 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

  8077   8077     sqlite3_snapshot **ppSnapshot
  8078   8078   );
  8079   8079   
  8080   8080   /*
  8081   8081   ** CAPI3REF: Start a read transaction on an historical snapshot
  8082   8082   ** EXPERIMENTAL
  8083   8083   **
  8084         -** ^The [sqlite3_snapshot_open(D,S,P)] interface attempts to move the
  8085         -** read transaction that is currently open on schema S of
  8086         -** [database connection] D so that it refers to historical [snapshot] P.
         8084  +** ^The [sqlite3_snapshot_open(D,S,P)] interface starts a
         8085  +** read transaction for schema S of
         8086  +** [database connection] D such that the read transaction
         8087  +** refers to historical [snapshot] P, rather than the most
         8088  +** recent change to the database.
  8087   8089   ** ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK on success
  8088   8090   ** or an appropriate [error code] if it fails.
  8089   8091   **
  8090   8092   ** ^In order to succeed, a call to [sqlite3_snapshot_open(D,S,P)] must be
  8091         -** the first operation, apart from other sqlite3_snapshot_open() calls,
  8092         -** following the [BEGIN] that starts a new read transaction.
  8093         -** ^A [snapshot] will fail to open if it has been overwritten by a 
         8093  +** the first operation following the [BEGIN] that takes the schema S
         8094  +** out of [autocommit mode].
         8095  +** ^In other words, schema S must not currently be in
         8096  +** a transaction for [sqlite3_snapshot_open(D,S,P)] to work, but the
         8097  +** database connection D must be out of [autocommit mode].
         8098  +** ^A [snapshot] will fail to open if it has been overwritten by a
  8094   8099   ** [checkpoint].
  8095         -** ^A [snapshot] will fail to open if the database connection D has not
  8096         -** previously completed at least one read operation against the database 
  8097         -** file.  (Hint: Run "[PRAGMA application_id]" against a newly opened
         8100  +** ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the
         8101  +** database connection D does not know that the database file for
         8102  +** schema S is in [WAL mode].  A database connection might not know
         8103  +** that the database file is in [WAL mode] if there has been no prior
         8104  +** I/O on that database connection, or if the database entered [WAL mode] 
         8105  +** after the most recent I/O on the database connection.)^
         8106  +** (Hint: Run "[PRAGMA application_id]" against a newly opened
  8098   8107   ** database connection in order to make it ready to use snapshots.)
  8099   8108   **
  8100   8109   ** The [sqlite3_snapshot_open()] interface is only available when the
  8101   8110   ** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
  8102   8111   */
  8103   8112   SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
  8104   8113     sqlite3 *db,