mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Fix the ptrmapPageno() routine so that it works correctly for an input of 1.
FossilOrigin-Name: 699a9bf28377f43f58c509878cce60cb906dbf48
This commit is contained in:
18
manifest
18
manifest
@@ -1,8 +1,8 @@
|
|||||||
-----BEGIN PGP SIGNED MESSAGE-----
|
-----BEGIN PGP SIGNED MESSAGE-----
|
||||||
Hash: SHA1
|
Hash: SHA1
|
||||||
|
|
||||||
C Do\snot\sallow\sa\sbackup\sto\schange\sthe\spage\ssize\sif\sa\scodec\sis\sin\suse.
|
C Fix\sthe\sptrmapPageno()\sroutine\sso\sthat\sit\sworks\scorrectly\sfor\san\sinput\sof\s1.
|
||||||
D 2010-08-20T15:32:21
|
D 2010-08-21T15:09:37
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd
|
F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -116,7 +116,7 @@ F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34
|
|||||||
F src/backup.c 8ff0b7018df253c7f30d3f9702b0b16f19209d5c
|
F src/backup.c 8ff0b7018df253c7f30d3f9702b0b16f19209d5c
|
||||||
F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
|
F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
|
||||||
F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff
|
F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff
|
||||||
F src/btree.c 69942b33b4ed4e0cc9a36b18a288839293528267
|
F src/btree.c 2dff4076d3c994dc1954ec7c1792febd49e13631
|
||||||
F src/btree.h b4ba2fdf6b64c7c376bdfffa826af6b786b151d9
|
F src/btree.h b4ba2fdf6b64c7c376bdfffa826af6b786b151d9
|
||||||
F src/btreeInt.h 5b034ff54800046cc5870605d683ac1f9134bd99
|
F src/btreeInt.h 5b034ff54800046cc5870605d683ac1f9134bd99
|
||||||
F src/build.c 0018d49629fc4807100c988dd191dd95e185bb38
|
F src/build.c 0018d49629fc4807100c988dd191dd95e185bb38
|
||||||
@@ -848,14 +848,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||||
P 6a0cbb272c3f0c1dfdeed381ba92f2f2f16ae824
|
P 5523ecd32295c188e3bf5dbd57d92d2879461e32
|
||||||
R 4d947b2be8e528f5b1f57b6ae25bb254
|
R dc568dd5438d0cab5b031335b05c73a5
|
||||||
U drh
|
U drh
|
||||||
Z a5dd11d4db14995185bd3cc381bc0177
|
Z 4fafdd21c95475ac900afea2d119affc
|
||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
Version: GnuPG v1.4.6 (GNU/Linux)
|
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||||
|
|
||||||
iD8DBQFMbqAJoxKgR168RlERAtWjAJsGkTB7PoEEAyEHc28sHL4Q6xG9XQCghnJH
|
iD8DBQFMb+w3oxKgR168RlERAu8pAJ9xUYJ2vVngElJD9AJ0FdpZF4d/kACaA0pc
|
||||||
TrSCzzZw80Uns0M1vpEzqWw=
|
mVGOV+o62jEkChLiO5Bqu4Q=
|
||||||
=GSse
|
=8+AE
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
@@ -1 +1 @@
|
|||||||
5523ecd32295c188e3bf5dbd57d92d2879461e32
|
699a9bf28377f43f58c509878cce60cb906dbf48
|
@@ -730,11 +730,16 @@ int sqlite3BtreeCursorHasMoved(BtCursor *pCur, int *pHasMoved){
|
|||||||
** Given a page number of a regular database page, return the page
|
** Given a page number of a regular database page, return the page
|
||||||
** number for the pointer-map page that contains the entry for the
|
** number for the pointer-map page that contains the entry for the
|
||||||
** input page number.
|
** input page number.
|
||||||
|
**
|
||||||
|
** Return 0 (not a valid page) for pgno==1 since there is
|
||||||
|
** no pointer map associated with page 1. The integrity_check logic
|
||||||
|
** requires that ptrmapPageno(*,1)!=1.
|
||||||
*/
|
*/
|
||||||
static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
|
static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
|
||||||
int nPagesPerMapPage;
|
int nPagesPerMapPage;
|
||||||
Pgno iPtrMap, ret;
|
Pgno iPtrMap, ret;
|
||||||
assert( sqlite3_mutex_held(pBt->mutex) );
|
assert( sqlite3_mutex_held(pBt->mutex) );
|
||||||
|
if( pgno<2 ) return 0;
|
||||||
nPagesPerMapPage = (pBt->usableSize/5)+1;
|
nPagesPerMapPage = (pBt->usableSize/5)+1;
|
||||||
iPtrMap = (pgno-2)/nPagesPerMapPage;
|
iPtrMap = (pgno-2)/nPagesPerMapPage;
|
||||||
ret = (iPtrMap*nPagesPerMapPage) + 2;
|
ret = (iPtrMap*nPagesPerMapPage) + 2;
|
||||||
|
Reference in New Issue
Block a user