aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2012-10-09 14:58:15 +0000
committerdrh <drh@noemail.net>2012-10-09 14:58:15 +0000
commitd1102b1ec7d50045cbbcf2575eacb2d423361fc7 (patch)
treea586e444e7362a6cf02fa05c85311851e36abb97 /src/os_unix.c
parentc4645dacfb435002911b187b474fa0788db9cde0 (diff)
parent5a55826bcda624f8fa4a3b7cc0c8845a689d8957 (diff)
downloadsqlite-d1102b1ec7d50045cbbcf2575eacb2d423361fc7.tar.gz
sqlite-d1102b1ec7d50045cbbcf2575eacb2d423361fc7.zip
Merge the latest trunk changes, especially the ORDER BY optimizer enhancements
but also other fixes, onto the sessions branch. FossilOrigin-Name: f1fbb8c5bfa84e84e0b8e2872d83b06a0c0d5acc
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index c0df66e8e..0852eb1a8 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3010,6 +3010,8 @@ static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
i64 newOffset;
#endif
TIMER_START;
+ assert( cnt==(cnt&0x1ffff) );
+ cnt &= 0x1ffff;
do{
#if defined(USE_PREAD)
got = osPread(id->h, pBuf, cnt, offset);
@@ -3099,6 +3101,8 @@ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
#if (!defined(USE_PREAD) && !defined(USE_PREAD64))
i64 newOffset;
#endif
+ assert( cnt==(cnt&0x1ffff) );
+ cnt &= 0x1ffff;
TIMER_START;
#if defined(USE_PREAD)
do{ got = osPwrite(id->h, pBuf, cnt, offset); }while( got<0 && errno==EINTR );