From: dan Date: Mon, 15 Sep 2014 16:53:23 +0000 (+0000) Subject: Fix tool/showwal.c so that it handles WAL files that contain 64KiB pages. X-Git-Tag: version-3.8.7~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6dea49f3d30bd348676eb5c6795f6f1ea5c173c;p=thirdparty%2Fsqlite.git Fix tool/showwal.c so that it handles WAL files that contain 64KiB pages. FossilOrigin-Name: 4060efb646c873c4abde7ab9ddf330489a44f274 --- diff --git a/manifest b/manifest index bf269d15d0..44c6f5bfa6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Avoid\sattempting\sto\scall\sthe\sxFetch()\smethod\sof\san\ssqlite3_io_methods\sobject\swith\sa\sversion\snumber\sless\sthan\s3. -D 2014-09-15T16:50:34.423 +C Fix\stool/showwal.c\sso\sthat\sit\shandles\sWAL\sfiles\sthat\scontain\s64KiB\spages. +D 2014-09-15T16:53:23.593 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -1179,7 +1179,7 @@ F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5 F tool/showdb.c bd073a78bce714a0e42d92ea474b3eb8cb53be5d F tool/showjournal.c 053eb1cc774710c6890b7dd6293300cc297b16a5 F tool/showstat4.c c39279d6bd37cb999b634f0064f6f86ad7af008f -F tool/showwal.c 3209120269cdf9380f091459e47b776b4f81dfd3 +F tool/showwal.c 85cb36d4fe3e93e2fbd63e786e0d1ce42d0c4fad F tool/soak1.tcl 8d407956e1a45b485a8e072470a3e629a27037fe F tool/space_used.tcl f714c41a59e326b8b9042f415b628b561bafa06b F tool/spaceanal.tcl 8e50b217c56a6a086a1b47eac9d09c5cd65b996f @@ -1198,7 +1198,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 69a64560777f85b47349b4b2aab01dc99298592e -R 41452df15ff1b435df3a846f31103df4 +P dedaa6fb3d2e6e697d4a48649af5f42d9a11c333 +R 9c897c2b35082efdf1b1cdba3d9a6e48 U dan -Z 356b29f991ba0eb562f8fca4ef2b2ea4 +Z fbf2bdf01c7200ebedc4b699448a8435 diff --git a/manifest.uuid b/manifest.uuid index 13bc35293d..f4f07abe9e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -dedaa6fb3d2e6e697d4a48649af5f42d9a11c333 \ No newline at end of file +4060efb646c873c4abde7ab9ddf330489a44f274 \ No newline at end of file diff --git a/tool/showwal.c b/tool/showwal.c index 6dc1de173f..35810c66a9 100644 --- a/tool/showwal.c +++ b/tool/showwal.c @@ -510,7 +510,7 @@ static void decode_btree_page( int main(int argc, char **argv){ struct stat sbuf; - unsigned char zPgSz[2]; + unsigned char zPgSz[4]; if( argc<2 ){ fprintf(stderr,"Usage: %s FILENAME ?PAGE? ...\n", argv[0]); exit(1); @@ -522,9 +522,9 @@ int main(int argc, char **argv){ } zPgSz[0] = 0; zPgSz[1] = 0; - lseek(fd, 10, SEEK_SET); - read(fd, zPgSz, 2); - pagesize = zPgSz[0]*256 + zPgSz[1]; + lseek(fd, 8, SEEK_SET); + read(fd, zPgSz, 4); + pagesize = zPgSz[1]*65536 + zPgSz[2]*256 + zPgSz[3]; if( pagesize==0 ) pagesize = 1024; printf("Pagesize: %d\n", pagesize); fstat(fd, &sbuf);