Add a fix for the assert() statements added by the previous commit.

FossilOrigin-Name: 19345416ed5e1ab5b0b35993b0b9069c2fb1683b
This commit is contained in:
dan 2013-03-22 17:46:11 +00:00
parent 6101d50471
commit c00033125d
3 changed files with 16 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Add\sassert\sstatements\sto\sos_unix.c\sto\sensure\sthat\sany\smapped\sregion\sof\sthe\sdatabase\sfile\sis\snot\sbeing\sread\sor\swritten\susing\sthe\sxRead()\sor\sxWrite()\smethods.
D 2013-03-22T08:58:38.319
C Add\sa\sfix\sfor\sthe\sassert()\sstatements\sadded\sby\sthe\sprevious\scommit.
D 2013-03-22T17:46:11.890
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 9a804abbd3cae82d196e4d33aba13239e32522a5
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -160,7 +160,7 @@ F src/notify.c 976dd0f6171d4588e89e874fcc765e92914b6d30
F src/os.c 87ea1cd1259c5840848e34007d72e772a2ab7528
F src/os.h 8d92f87f5fe14b060a853ca704b8ef6d3daee79b
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
F src/os_unix.c 18153e6fc03580e95d28fb39d47a4e8b64b36187
F src/os_unix.c 55d110879332831b734fd510cfbc5700e96a83cf
F src/os_win.c f7da4dc0a2545c0a430080380809946ae4d676d6
F src/pager.c 520001015155efee9599c807dfd38e5fff9c6e36
F src/pager.h 241d72dc0905df042da165f086d03505cb0bb50c
@ -1039,7 +1039,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
P 5c9e9df27b9f2c46cd55388a858d4e78ee564975
R eb2eb83f96de836951dbdb14158ccee8
P 765615f9fba7c1765eb741cb98a09a28b464ee55
R 125e508e18383c5f0a5b411a39a78cab
U dan
Z 42c0bd3cd106c51e7465866daa07e0a3
Z 4d1b2a2cebcc3fe5bdd2b5af2205540b

View File

@ -1 +1 @@
765615f9fba7c1765eb741cb98a09a28b464ee55
19345416ed5e1ab5b0b35993b0b9069c2fb1683b

View File

@ -3470,6 +3470,14 @@ static int unixTruncate(sqlite3_file *id, i64 nByte){
if( pFile->inNormalWrite && nByte==0 ){
pFile->transCntrChng = 1;
}
/* If the file was just truncated to a size smaller than the currently
** mapped region, reduce the effective mapping size as well. SQLite will
** use read() and write() to access data beyond this point from now on.
*/
if( nByte<pFile->mmapSize ){
pFile->mmapSize = nByte;
}
#endif
return SQLITE_OK;
@ -4461,7 +4469,7 @@ static int unixMremap(
i64 nOldRnd; /* nOld rounded up */
assert( iOff==0 );
assert( p->mmapSize==nOld );
/* assert( p->mmapSize==nOld ); */
assert( p->pMapRegion==0 || p->pMapRegion==(*ppMap) );
/* If the SQLITE_MREMAP_EXTEND flag is set, then the size of the requested