1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Remove all traces of SQLITE_FCNTL_WAL_BLOCK from the unix VFS - that feature

had been disabled for a long time and never actually worked.

FossilOrigin-Name: e1d5320ca089336e26d200305b744b06ce883be4
This commit is contained in:
drh
2015-12-02 00:05:26 +00:00
parent 053378dfa8
commit dcfb9652fd
3 changed files with 8 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
C Simplification\sto\sthe\sposix_fallocate()\sreplacement\sused\sfor\sthe\nSQLITE_FCNTL_SIZE_HINT\sfile\scontrol\sin\sthe\sunix\sVFS.
D 2015-12-01T22:09:42.967
C Remove\sall\straces\sof\sSQLITE_FCNTL_WAL_BLOCK\sfrom\sthe\sunix\sVFS\s-\sthat\sfeature\nhad\sbeen\sdisabled\sfor\sa\slong\stime\sand\snever\sactually\sworked.
D 2015-12-02T00:05:26.857
F Makefile.in 23d9a63484a383fc64951b25ef44067930f98dc6
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc e8fdca1cb89a1b58b5f4d3a130ea9a3d28cb314d
@@ -323,7 +323,7 @@ F src/os.c 8fd25588eeba74068d41102d26810e216999b6c8
F src/os.h 3e57a24e2794a94d3cf2342c6d9a884888cd96bf
F src/os_common.h abdb9a191a367793268fe553d25bab894e986a0e
F src/os_setup.h c9d4553b5aaa6f73391448b265b89bed0b890faa
F src/os_unix.c 5808a077bf6842a47d65197f7843d4c391636b75
F src/os_unix.c 8f8f11b64aa5b20f75f0a9e4ed494e51a641e62f
F src/os_win.c 386fba30419e8458b13209781c2af5590eab2811
F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
F src/pager.c f92aacd5216d8815136c9e0190041783c602641a
@@ -1408,7 +1408,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 9e1d6d4c391ff90077f0d1cdeb567969fee9f747
R 769374e25ea21fa88cb308a9a19cbf86
P 74934d3f60ad9f6550297410eada0f288e0123c4
R 1d7fdc365e66b6a0c98551c7522b87df
U drh
Z d260ee6b5b66bd6991fd3ea098b02c75
Z 0a345589f1af443a2c8f5dbd810973ee

View File

@@ -1 +1 @@
74934d3f60ad9f6550297410eada0f288e0123c4
e1d5320ca089336e26d200305b744b06ce883be4

View File

@@ -258,7 +258,6 @@ static pid_t randomnessPid = 0;
#define UNIXFILE_DELETE 0x20 /* Delete on close */
#define UNIXFILE_URI 0x40 /* Filename might have query parameters */
#define UNIXFILE_NOLOCK 0x80 /* Do no file locking */
#define UNIXFILE_BLOCK 0x0100 /* Next SHM lock might block */
/*
** Include code that is common to all os_*.c files
@@ -3717,10 +3716,6 @@ static int unixGetTempname(int nBuf, char *zBuf);
static int unixFileControl(sqlite3_file *id, int op, void *pArg){
unixFile *pFile = (unixFile*)id;
switch( op ){
case SQLITE_FCNTL_WAL_BLOCK: {
/* pFile->ctrlFlags |= UNIXFILE_BLOCK; // Deferred feature */
return SQLITE_OK;
}
case SQLITE_FCNTL_LOCKSTATE: {
*(int*)pArg = pFile->eFileLock;
return SQLITE_OK;
@@ -4050,7 +4045,6 @@ static int unixShmSystemLock(
assert( n>=1 && n<SQLITE_SHM_NLOCK );
if( pShmNode->h>=0 ){
int lkType;
/* Initialize the locking parameters */
memset(&f, 0, sizeof(f));
f.l_type = lockType;
@@ -4058,10 +4052,8 @@ static int unixShmSystemLock(
f.l_start = ofst;
f.l_len = n;
lkType = (pFile->ctrlFlags & UNIXFILE_BLOCK)!=0 ? F_SETLKW : F_SETLK;
rc = osFcntl(pShmNode->h, lkType, &f);
rc = osFcntl(pShmNode->h, F_SETLK, &f);
rc = (rc!=(-1)) ? SQLITE_OK : SQLITE_BUSY;
pFile->ctrlFlags &= ~UNIXFILE_BLOCK;
}
/* Update the global lock state and do debug tracing */