aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest18
-rw-r--r--manifest.uuid2
-rw-r--r--src/os_unix.c25
3 files changed, 20 insertions, 25 deletions
diff --git a/manifest b/manifest
index 885c09aea..25c8979c2 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sexperimental\ssupport\sfor\sthe\s'test_fs'\stest\smodule\son\sWin32.
-D 2015-11-30T23:29:07.971
+C The\stest_fs.c\stest\smodule\snow\sworks\son\sWindows.
+D 2015-12-01T17:48:45.370
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 88d9fd1da4f3d26c64ef954fb32cce583605eba0
+F src/os_unix.c 7d56433ac85e77423d2d613fd5e53db08c5868ed
F src/os_win.c 386fba30419e8458b13209781c2af5590eab2811
F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
F src/pager.c f92aacd5216d8815136c9e0190041783c602641a
@@ -1408,10 +1408,8 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P ecad75d69e0d5c83dd3584d363e557e84b65f7f2
-R b2c7ca19fb46e255338240c0ac77a2e4
-T *branch * testFsWin32
-T *sym-testFsWin32 *
-T -sym-trunk *
-U mistachkin
-Z b75cf97131a1f035edfb9c37c590fcf6
+P 9eefa449792f03c4c149edcbc6b9b7692617994c f3ffb3aeea95712e92919fd5071741327add9643
+R e64b655038c6ea5e388ada04c5bc3077
+T +closed f3ffb3aeea95712e92919fd5071741327add9643
+U drh
+Z d6f52c287ea9591be795be1577b20991
diff --git a/manifest.uuid b/manifest.uuid
index 2659aede2..e2f8fb6ba 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-f3ffb3aeea95712e92919fd5071741327add9643 \ No newline at end of file
+e3d8628456848a70035bbdeca6dc6c21f688b9a5 \ No newline at end of file
diff --git a/src/os_unix.c b/src/os_unix.c
index e5103856b..475beed28 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3086,13 +3086,9 @@ static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
SimulateIOError( got = -1 );
#else
newOffset = lseek(id->h, offset, SEEK_SET);
- SimulateIOError( newOffset-- );
- if( newOffset!=offset ){
- if( newOffset == -1 ){
- storeLastErrno((unixFile*)id, errno);
- }else{
- storeLastErrno((unixFile*)id, 0);
- }
+ SimulateIOError( newOffset = -1 );
+ if( newOffset<0 ){
+ storeLastErrno((unixFile*)id, errno);
return -1;
}
got = osRead(id->h, pBuf, cnt);
@@ -3191,6 +3187,7 @@ static int seekAndWriteFd(
assert( nBuf==(nBuf&0x1ffff) );
assert( fd>2 );
+ assert( piErrno!=0 );
nBuf &= 0x1ffff;
TIMER_START;
@@ -3201,11 +3198,10 @@ static int seekAndWriteFd(
#else
do{
i64 iSeek = lseek(fd, iOff, SEEK_SET);
- SimulateIOError( iSeek-- );
-
- if( iSeek!=iOff ){
- if( piErrno ) *piErrno = (iSeek==-1 ? errno : 0);
- return -1;
+ SimulateIOError( iSeek = -1 );
+ if( iSeek<0 ){
+ rc = -1;
+ break;
}
rc = osWrite(fd, pBuf, nBuf);
}while( rc<0 && errno==EINTR );
@@ -3214,7 +3210,7 @@ static int seekAndWriteFd(
TIMER_END;
OSTRACE(("WRITE %-3d %5d %7lld %llu\n", fd, rc, iOff, TIMER_ELAPSED));
- if( rc<0 && piErrno ) *piErrno = errno;
+ if( rc<0 ) *piErrno = errno;
return rc;
}
@@ -4410,7 +4406,8 @@ static int unixShmMap(
/* Write to the last byte of each newly allocated or extended page */
assert( (nByte % pgsz)==0 );
for(iPg=(sStat.st_size/pgsz); iPg<(nByte/pgsz); iPg++){
- if( seekAndWriteFd(pShmNode->h, iPg*pgsz + pgsz-1, "", 1, 0)!=1 ){
+ int x = 0;
+ if( seekAndWriteFd(pShmNode->h, iPg*pgsz + pgsz-1, "", 1, &x)!=1 ){
const char *zFile = pShmNode->zFilename;
rc = unixLogError(SQLITE_IOERR_SHMSIZE, "write", zFile);
goto shmpage_out;