/ Check-in [4c70ea5b]
Login

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

Overview
Comment:Fix a harmless compiler warning in the pager. Enhance the docs for sqlite3_changes() and sqlite3_total_changes() to refer to the data_version pragma.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:4c70ea5b0e2a512c6a46ac1f14397720e8c8556875701e78c30b19f850c24f55
User & Date: drh 2018-07-18 17:37:51
Context
2018-07-18
19:09
Add the SQLITE_FCNTL_DATA_VERSION file control check-in: a5087c5c user: drh tags: trunk
17:37
Fix a harmless compiler warning in the pager. Enhance the docs for sqlite3_changes() and sqlite3_total_changes() to refer to the data_version pragma. check-in: 4c70ea5b user: drh tags: trunk
2018-07-17
14:01
If an SQLITE_IOERR error is encountered as part of an atomic commit on an F2FS file-system, retry the commit in legacy journal mode. check-in: 2e0357c2 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.c.

  6402   6402           sqlite3PcacheCleanAll(pPager->pPCache);
  6403   6403         }
  6404   6404       }else{
  6405   6405         /* The bBatch boolean is true if the batch-atomic-write commit method
  6406   6406         ** should be used.  No rollback journal is created if batch-atomic-write
  6407   6407         ** is enabled.
  6408   6408         */
  6409         -      sqlite3_file *fd = pPager->fd;
  6410   6409   #ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
         6410  +      sqlite3_file *fd = pPager->fd;
  6411   6411         int bBatch = zMaster==0    /* An SQLITE_IOCAP_BATCH_ATOMIC commit */
  6412   6412           && (sqlite3OsDeviceCharacteristics(fd) & SQLITE_IOCAP_BATCH_ATOMIC)
  6413   6413           && !pPager->noSync
  6414   6414           && sqlite3JournalIsInMemory(pPager->jfd);
  6415   6415   #else
  6416         -# define bBatch 0
         6416  +#     define bBatch 0
  6417   6417   #endif
  6418   6418   
  6419   6419   #ifdef SQLITE_ENABLE_ATOMIC_WRITE
  6420   6420         /* The following block updates the change-counter. Exactly how it
  6421   6421         ** does this depends on whether or not the atomic-update optimization
  6422   6422         ** was enabled at compile time, and if this transaction meets the 
  6423   6423         ** runtime criteria to use the operation: 

Changes to src/sqlite.h.in.

  2272   2272   ** ^This means that if the changes() SQL function (or similar) is used
  2273   2273   ** by the first INSERT, UPDATE or DELETE statement within a trigger, it 
  2274   2274   ** returns the value as set when the calling statement began executing.
  2275   2275   ** ^If it is used by the second or subsequent such statement within a trigger 
  2276   2276   ** program, the value returned reflects the number of rows modified by the 
  2277   2277   ** previous INSERT, UPDATE or DELETE statement within the same trigger.
  2278   2278   **
  2279         -** See also the [sqlite3_total_changes()] interface, the
  2280         -** [count_changes pragma], and the [changes() SQL function].
  2281         -**
  2282   2279   ** If a separate thread makes changes on the same database connection
  2283   2280   ** while [sqlite3_changes()] is running then the value returned
  2284   2281   ** is unpredictable and not meaningful.
         2282  +**
         2283  +** See also:
         2284  +** <ul>
         2285  +** <li> the [sqlite3_total_changes()] interface
         2286  +** <li> the [count_changes pragma]
         2287  +** <li> the [changes() SQL function]
         2288  +** <li> the [data_version pragma]
         2289  +** </ul>
  2285   2290   */
  2286   2291   int sqlite3_changes(sqlite3*);
  2287   2292   
  2288   2293   /*
  2289   2294   ** CAPI3REF: Total Number Of Rows Modified
  2290   2295   ** METHOD: sqlite3
  2291   2296   **
................................................................................
  2296   2301   ** does not affect the value returned by sqlite3_total_changes().
  2297   2302   ** 
  2298   2303   ** ^Changes made as part of [foreign key actions] are included in the
  2299   2304   ** count, but those made as part of REPLACE constraint resolution are
  2300   2305   ** not. ^Changes to a view that are intercepted by INSTEAD OF triggers 
  2301   2306   ** are not counted.
  2302   2307   ** 
  2303         -** See also the [sqlite3_changes()] interface, the
  2304         -** [count_changes pragma], and the [total_changes() SQL function].
  2305         -**
  2306   2308   ** If a separate thread makes changes on the same database connection
  2307   2309   ** while [sqlite3_total_changes()] is running then the value
  2308   2310   ** returned is unpredictable and not meaningful.
         2311  +**
         2312  +** See also:
         2313  +** <ul>
         2314  +** <li> the [sqlite3_changes()] interface
         2315  +** <li> the [count_changes pragma]
         2316  +** <li> the [changes() SQL function]
         2317  +** <li> the [data_version pragma]
         2318  +** </ul>
  2309   2319   */
  2310   2320   int sqlite3_total_changes(sqlite3*);
  2311   2321   
  2312   2322   /*
  2313   2323   ** CAPI3REF: Interrupt A Long-Running Query
  2314   2324   ** METHOD: sqlite3
  2315   2325   **