The pager takes the sector size to be the larger of the sector size
reported by sqlite3OsSectorSize() and the page size. (CVS 3890) FossilOrigin-Name: e5e6af55ccc5c1a8a9206b42f1dd7bf547cb97ca
This commit is contained in:
parent
0b6212090f
commit
c80f058db3
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Propagate\sprefix\sflag\sthrough\simplementation\sof\sdoclist\squery\scode.\nAlso\simplement\scorrect\sprefix-handling\sfor\straversal\sof\sinterior\snodes\nof\ssegment\stree.\s\sA\sgiven\sprefix\scan\sspan\smultiple\schildren\sof\san\ninterior\snode,\sand\sfrom\sthere\sthe\sbranches\sneed\sto\sbe\sfollowed\sin\nparallel.\s(CVS\s3889)
|
||||
D 2007-04-30T22:09:36
|
||||
C The\spager\stakes\sthe\ssector\ssize\sto\sbe\sthe\slarger\sof\sthe\ssector\ssize\nreported\sby\ssqlite3OsSectorSize()\sand\sthe\spage\ssize.\s(CVS\s3890)
|
||||
D 2007-05-01T16:59:49
|
||||
F Makefile.in 8cab54f7c9f5af8f22fd97ddf1ecfd1e1860de62
|
||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -87,7 +87,7 @@ F src/os_unix.c 426b4c03c304ad78746d65d9ba101e0b72e18e23
|
||||
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
||||
F src/os_win.c e94903c7dc1c0599c8ddce42efa0b6928068ddc5
|
||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||
F src/pager.c 48b1ebe8c9bcd8a9544ebef13c85547f28e8bb6b
|
||||
F src/pager.c 23da15e142d77ae068b50c432c7d363902fbbab3
|
||||
F src/pager.h d652ddf092d2318d00e41f8539760fe8e57c157c
|
||||
F src/parse.y a3940369e12c69c4968aa580cdc74cf73a664980
|
||||
F src/pragma.c 4fdefc03c3fd0ee87f8aad82bf80ba9bf1cdf416
|
||||
@ -466,7 +466,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
||||
P 27bf3fc3cf3c9c7acdbf9281a4669c9f642b0097
|
||||
R 63d81c2be8a311270ed3c4c7a986450a
|
||||
U shess
|
||||
Z 814272b1a687282acf6dc59544d4e360
|
||||
P cae844a01a1d87ffb00bba8b4e7b62a92e633aa9
|
||||
R 195e13614b6e5b993d99e293e129cc37
|
||||
U drh
|
||||
Z e4fd6258dd404077dd1b05dd5e45d3e2
|
||||
|
@ -1 +1 @@
|
||||
cae844a01a1d87ffb00bba8b4e7b62a92e633aa9
|
||||
e5e6af55ccc5c1a8a9206b42f1dd7bf547cb97ca
|
19
src/pager.c
19
src/pager.c
@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.331 2007/04/28 15:47:44 danielk1977 Exp $
|
||||
** @(#) $Id: pager.c,v 1.332 2007/05/01 16:59:49 drh Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@ -1250,6 +1250,19 @@ static int pager_truncate(Pager *pPager, int nPage){
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** Set the sectorSize for the given pager.
|
||||
**
|
||||
** The sector size is the larger of the sector size reported
|
||||
** by sqlite3OsSectorSize() and the pageSize.
|
||||
*/
|
||||
static void setSectorSize(Pager *pPager){
|
||||
pPager->sectorSize = sqlite3OsSectorSize(pPager->fd);
|
||||
if( pPager->sectorSize<pPager->pageSize ){
|
||||
pPager->sectorSize = pPager->pageSize;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Playback the journal and thus restore the database file to
|
||||
** the state it was in before we started making changes.
|
||||
@ -1417,7 +1430,7 @@ end_playback:
|
||||
** back a journal created by a process with a different sector size
|
||||
** value. Reset it to the correct value for this process.
|
||||
*/
|
||||
pPager->sectorSize = sqlite3OsSectorSize(pPager->fd);
|
||||
setSectorSize(pPager);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -1764,7 +1777,7 @@ int sqlite3PagerOpen(
|
||||
pPager->nExtra = FORCE_ALIGNMENT(nExtra);
|
||||
assert(fd||memDb);
|
||||
if( !memDb ){
|
||||
pPager->sectorSize = sqlite3OsSectorSize(fd);
|
||||
setSectorSize(pPager);
|
||||
}
|
||||
/* pPager->pBusyHandler = 0; */
|
||||
/* memset(pPager->aHash, 0, sizeof(pPager->aHash)); */
|
||||
|
Loading…
x
Reference in New Issue
Block a user