1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Use SQLITE_FCNTL_SYNC instead of SQLITE_FCNTL_SYNC_OMITTED. Add documentation in for FCNTL_SYNC and FCNTL_COMMIT_PHASETWO.

FossilOrigin-Name: 46231af985a1a872d1dc3418591cbaacb0b7c249
This commit is contained in:
dan
2013-12-10 17:34:53 +00:00
parent d22d7b4daa
commit 6f68f1640d
4 changed files with 34 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
C Merge\schanges\sfrom\sthe\strunk. C Use\sSQLITE_FCNTL_SYNC\sinstead\sof\sSQLITE_FCNTL_SYNC_OMITTED.\sAdd\sdocumentation\sin\sfor\sFCNTL_SYNC\sand\sFCNTL_COMMIT_PHASETWO.
D 2013-12-10T16:35:42.772 D 2013-12-10T17:34:53.300
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in e1a9b4258bbde53f5636f4e238c65b7e11459e2b F Makefile.in e1a9b4258bbde53f5636f4e238c65b7e11459e2b
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -207,7 +207,7 @@ F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
F src/os_unix.c 60a7b3b23e6fcf83a50d1e320b280b551724e11f F src/os_unix.c 60a7b3b23e6fcf83a50d1e320b280b551724e11f
F src/os_win.c 16eac0961603182ffc10c02b39fe830126538e07 F src/os_win.c 16eac0961603182ffc10c02b39fe830126538e07
F src/pager.c 458c580b63f7f023e9863050f938dcd6eaae026f F src/pager.c 994b3ee3716c89707952051115d72e0bd877e7b9
F src/pager.h 6a790b64a9ea79bc2c849bdefdd39e2344bca94a F src/pager.h 6a790b64a9ea79bc2c849bdefdd39e2344bca94a
F src/parse.y acee1a9958539e21263362b194594c5255ad2fca F src/parse.y acee1a9958539e21263362b194594c5255ad2fca
F src/pcache.c f8043b433a57aba85384a531e3937a804432a346 F src/pcache.c f8043b433a57aba85384a531e3937a804432a346
@@ -221,7 +221,7 @@ F src/resolve.c 7eda9097b29fcf3d2b42fdc17d1de672134e09b6
F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
F src/select.c d41381d80a22d3a83352aeca274cccf264ac277a F src/select.c d41381d80a22d3a83352aeca274cccf264ac277a
F src/shell.c 936a72ff784efff3832cce274a96ed0b036e6758 F src/shell.c 936a72ff784efff3832cce274a96ed0b036e6758
F src/sqlite.h.in 767b7475655de093182ec3d7b1f66a0cf5f1c390 F src/sqlite.h.in 592057b6b3881573c2d516bad30fb20171f16b05
F src/sqlite3.rc 11094cc6a157a028b301a9f06b3d03089ea37c3e F src/sqlite3.rc 11094cc6a157a028b301a9f06b3d03089ea37c3e
F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc
F src/sqliteInt.h c59b756b3aebefdce24ff44c4a7b3c155a3c26ee F src/sqliteInt.h c59b756b3aebefdce24ff44c4a7b3c155a3c26ee
@@ -1146,7 +1146,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
P d9a5f44f4a27336d41e60b6c3791bd018fbbff6f 7277a769694787e0332d1a4efc02041834661e2a P 3ee736a39d1fc175a297c5fdd0d2e1c5a9b5b18e
R 7fad7524df4e460d9aeda5901ac3e435 R 00ff1143b8ee30f4eb0b986958de8c12
U dan U dan
Z 4d74f8c53424c0d52f5bb5be0f7994e7 Z 4539dd639fdb6689f35ca693fd45b226

View File

@@ -1 +1 @@
3ee736a39d1fc175a297c5fdd0d2e1c5a9b5b18e 46231af985a1a872d1dc3418591cbaacb0b7c249

View File

@@ -6011,7 +6011,7 @@ int sqlite3PagerSync(Pager *pPager, const char *zMaster){
if( isOpen(pPager->fd) ){ if( isOpen(pPager->fd) ){
void *pArg = (void*)zMaster; void *pArg = (void*)zMaster;
rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SYNC_OMITTED, pArg); rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SYNC, pArg);
if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK; if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;
} }
if( rc==SQLITE_OK && !pPager->noSync ){ if( rc==SQLITE_OK && !pPager->noSync ){

View File

@@ -786,15 +786,29 @@ struct sqlite3_io_methods {
** additional information. ** additional information.
** **
** <li>[[SQLITE_FCNTL_SYNC_OMITTED]] ** <li>[[SQLITE_FCNTL_SYNC_OMITTED]]
** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by ** No longer in use.
** SQLite and sent to all VFSes in place of a call to the xSync method **
** when the database connection has [PRAGMA synchronous] set to OFF.)^ ** <li>[[SQLITE_FCNTL_SYNC]]
** Some specialized VFSes need this signal in order to operate correctly ** The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and
** when [PRAGMA synchronous | PRAGMA synchronous=OFF] is set, but most ** sent to the VFS immediately before the xSync method is invoked on a
** VFSes do not need this signal and should silently ignore this opcode. ** database file descriptor. Or, if the xSync method is not invoked
** Applications should not call [sqlite3_file_control()] with this ** because the user has configured SQLite with
** opcode as doing so may disrupt the operation of the specialized VFSes ** [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place
** that do require it. ** of the xSync method. In most cases, the pointer argument passed with
** this file-control is NULL. However, if the database file is being synced
** as part of a multi-database commit, the argument points to a nul-terminated
** string containing the transactions master-journal file name. VFSes that
** do not need this signal should silently ignore this opcode. Applications
** should not call [sqlite3_file_control()] with this opcode as doing so may
** disrupt the operation of the specialized VFSes that do require it.
**
** <li>[[SQLITE_FCNTL_COMMIT_PHASETWO]]
** The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite
** and sent to the VFS after a transaction has been committed immediately
** but before the database is unlocked. VFSes that do not need this signal
** should silently ignore this opcode. Applications should not call
** [sqlite3_file_control()] with this opcode as doing so may disrupt the
** operation of the specialized VFSes that do require it.
** **
** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]] ** <li>[[SQLITE_FCNTL_WIN32_AV_RETRY]]
** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic ** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic
@@ -945,8 +959,8 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_MMAP_SIZE 18 #define SQLITE_FCNTL_MMAP_SIZE 18
#define SQLITE_FCNTL_TRACE 19 #define SQLITE_FCNTL_TRACE 19
#define SQLITE_FCNTL_HAS_MOVED 20 #define SQLITE_FCNTL_HAS_MOVED 20
#define SQLITE_FCNTL_SYNC 21
#define SQLITE_FCNTL_COMMIT_PHASETWO 21 #define SQLITE_FCNTL_COMMIT_PHASETWO 22
/* /*
** CAPI3REF: Mutex Handle ** CAPI3REF: Mutex Handle