]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Change the unix VFS so that it ignores all but the least-significant bit
authordrh <drh@noemail.net>
Thu, 5 Jan 2012 16:07:30 +0000 (16:07 +0000)
committerdrh <drh@noemail.net>
Thu, 5 Jan 2012 16:07:30 +0000 (16:07 +0000)
of the syncDir flag to xDelete.  Add an assert to prove that the core only
ever uses that one bit.

FossilOrigin-Name: e75fd3b27423272b988921ac0e272f9600818b8c

manifest
manifest.uuid
src/os.c
src/os_unix.c

index bd8f246a59143080ec067c4a6d0129e0c7856fa2..29a78cf5279d0bb4065554c89f9f22140efd0fac 100644 (file)
--- a/manifest
+++ b/manifest
@@ -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
index e41b00255241eb191568d1bd1ef93e9a329f416f..fdb3125f33db9b35eedfaf35f3e8c72f244d2031 100644 (file)
@@ -1 +1 @@
-1378f905d37544701776d38987fe7a312b255983
\ No newline at end of file
+e75fd3b27423272b988921ac0e272f9600818b8c
\ No newline at end of file
index c26429bf9a027e4896b4ca7ee1979d4fe7ec69f6..2dbae443437a0229571dbb39ff2d4710c3ff24b7 100644 (file)
--- a/src/os.c
+++ b/src/os.c
@@ -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(
index 4f263bcdd0238c85f31b73f909c76af353552f0b..9a3cdfb9bb461095c38387117049326f635cd72d 100644 (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 ){