Change the unix VFS so that it ignores all but the least-significant bit

of the syncDir flag to xDelete.  Add an assert to prove that the core only
ever uses that one bit.

FossilOrigin-Name: e75fd3b27423272b988921ac0e272f9600818b8c
This commit is contained in:
drh 2012-01-05 16:07:30 +00:00
parent e0711b47b1
commit e349519f1e
4 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Ensure\s8-byte\salignment\sof\sIndex.aiRowEst[]\selements\seven\sif\sthe\ssize\sof\nan\sIndex\sobject\sis\snot\sa\smultiple\sof\s8\sbytes.
D 2012-01-05T12:38:02.435
C Change\sthe\sunix\sVFS\sso\sthat\sit\signores\sall\sbut\sthe\sleast-significant\sbit\nof\sthe\ssyncDir\sflag\sto\sxDelete.\s\sAdd\san\sassert\sto\sprove\sthat\sthe\score\sonly\never\suses\sthat\sone\sbit.
D 2012-01-05T16:07:30.209
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -162,11 +162,11 @@ F src/mutex_os2.c 882d735098c07c8c6a5472b8dd66e19675fe117f
F src/mutex_unix.c c3a4e00f96ba068a8dbef34084465979aaf369cc
F src/mutex_w32.c 5e54f3ba275bcb5d00248b8c23107df2e2f73e33
F src/notify.c 976dd0f6171d4588e89e874fcc765e92914b6d30
F src/os.c 519bdf7c608c4848024e1d87934f9305454145f4
F src/os.c f03339a44ded105eafcd7185a420a51d51e0f6ee
F src/os.h c7d888830f168a9b681b3aec30789f4ad2445c17
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
F src/os_os2.c 4a75888ba3dfc820ad5e8177025972d74d7f2440
F src/os_unix.c f19ca2ef603e4f6510f3daf206e244476a68413d
F src/os_unix.c b65e2d9084283de26037f26380973808a771756d
F src/os_win.c 88b35c8fe7b32c7398ceace727ea01120cb21989
F src/pager.c 5b89ab92631a8fc488b87cc663ab064802173fec
F src/pager.h 5cd760857707529b403837d813d86b68938d6183
@ -986,7 +986,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
P 7cf568a101cda20ab6005bd250154b7f6960193a
R 17a54c6dc9279f1461f74799fcc0456e
P 1378f905d37544701776d38987fe7a312b255983
R e3fe2e2961216736cb0dde749803d09d
U drh
Z e2b3f0a5a9dd1fb18b07ce4e17a75f03
Z d2ae5820d0aa451c58938d7eb1217fca

View File

@ -1 +1 @@
1378f905d37544701776d38987fe7a312b255983
e75fd3b27423272b988921ac0e272f9600818b8c

View File

@ -151,6 +151,7 @@ int sqlite3OsOpen(
}
int sqlite3OsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){
DO_OS_MALLOC_TEST(0);
assert( dirSync==0 || dirSync==1 );
return pVfs->xDelete(pVfs, zPath, dirSync);
}
int sqlite3OsAccess(

View File

@ -5216,7 +5216,7 @@ static int unixDelete(
return unixLogError(SQLITE_IOERR_DELETE, "unlink", zPath);
}
#ifndef SQLITE_DISABLE_DIRSYNC
if( dirSync ){
if( (dirSync & 1)!=0 ){
int fd;
rc = osOpenDirectory(zPath, &fd);
if( rc==SQLITE_OK ){