-C Add\stest\scase\sto\se_expr.test.
-D 2010-08-14T18:32:24
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+C Adjustments\sfor\sbetter\s64K\spage\ssize\shandling.
+D 2010-08-14T21:21:25
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/backup.c 51d83300fe0baee39405c416ceb19a58ed30a8ed
F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff
-F src/btree.c f5758ebc3601b57ed8510b97b3d4cff8dcaef995
+F src/btree.c 083ced0941ef7c3bcb667b7319114ab492ed4325
F src/btree.h b4ba2fdf6b64c7c376bdfffa826af6b786b151d9
F src/btreeInt.h 5b034ff54800046cc5870605d683ac1f9134bd99
F src/build.c 0018d49629fc4807100c988dd191dd95e185bb38
F src/vdbemem.c e5673f81a2381b35c60e73ef0a8502be2ab1041e
F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2
F src/vtab.c 0e8e0cb30dffb078367e843e84e37ef99236c7e4
-F src/wal.c c79ae356eb124ba2ca4e9842e30bc1fa9c0ef273
+F src/wal.c c2d20c37c594e8d67facb273184fcd70e881bd02
F src/wal.h 96669b645e27cd5a111ba59f0cae7743a207bc3c
F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
F src/where.c 7db3e41c2a846f9deeb24f1bbb75461b4010b7b5
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 7dd78eb7974ec7c40af3fcf2b125ca5bc0766b5c
-R 0228d9fad28861af037393c6d2923e36
-U dan
-Z 43f60defab7e944b5b137eea1702bf95
+P db9539f2ceabd3c5a3eb5d4701f80f4e7da9344d
+R 1a92e64b60334d2b1f13f1288894a05a
+U drh
+Z cb5fbd482dc54c48c890fe543adb260b
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFMZwjYoxKgR168RlERAuTTAKCAlGN4ms1osdDGqkAZEJOT1U/ayQCeKWVo
+j5q8jHm2fn070zRuR44G9+w=
+=r7zM
+-----END PGP SIGNATURE-----
**
** The actual header in the wal-index consists of two copies of this
** object.
+**
+** The szPage value can be any power of 2 between 512 and 32768, inclusive.
+** Or it can be 1 to represent a 65536-byte page. The latter case was
+** added in 3.7.1 when support for 64K pages was added.
*/
struct WalIndexHdr {
u32 iVersion; /* Wal-index version */
u32 iChange; /* Counter incremented each transaction */
u8 isInit; /* 1 when initialized */
u8 bigEndCksum; /* True if checksums in WAL are big-endian */
- u16 szPage; /* Database page size in bytes */
+ u16 szPage; /* Database page size in bytes. 1==64K */
u32 mxFrame; /* Index of last valid frame in the WAL */
u32 nPage; /* Size of database in pages */
u32 aFrameCksum[2]; /* Checksum of last frame in log */
if( nTruncate ){
pWal->hdr.mxFrame = iFrame;
pWal->hdr.nPage = nTruncate;
- pWal->hdr.szPage = (szPage>=0x10000) ? (szPage>>16) : szPage;
+ pWal->hdr.szPage = (szPage&0xff00) | (szPage>>16);
+ testcase( szPage<=32768 );
+ testcase( szPage>=65536 );
aFrameCksum[0] = pWal->hdr.aFrameCksum[0];
aFrameCksum[1] = pWal->hdr.aFrameCksum[1];
}
int i; /* Loop counter */
volatile WalCkptInfo *pInfo; /* The checkpoint status information */
- szPage = pWal->hdr.szPage;
- if( szPage<512 ) szPage <<= 16;
+ szPage = (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);
+ testcase( szPage<=32768 );
+ testcase( szPage>=65536 );
if( pWal->hdr.mxFrame==0 ) return SQLITE_OK;
/* Allocate the iterator */
if( memcmp(&pWal->hdr, &h1, sizeof(WalIndexHdr)) ){
*pChanged = 1;
memcpy(&pWal->hdr, &h1, sizeof(WalIndexHdr));
- pWal->szPage = pWal->hdr.szPage;
- if( pWal->szPage<512 ) pWal->szPage <<= 16;
+ pWal->szPage = (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);
+ testcase( pWal->szPage<=32768 );
+ testcase( pWal->szPage>=65536 );
}
/* The header was successfully read. Return zero. */
int sz;
i64 iOffset;
sz = pWal->hdr.szPage;
- if( sz<512 ) sz <<= 16;
+ sz = (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);
+ testcase( sz<=32768 );
+ testcase( sz>=65536 );
iOffset = walFrameOffset(iRead, sz) + WAL_FRAME_HDRSIZE;
*pInWal = 1;
/* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */
if( rc==SQLITE_OK ){
/* Update the private copy of the header. */
- pWal->hdr.szPage = szPage>=0x10000 ? (szPage >> 16) : szPage;
+ pWal->hdr.szPage = (szPage&0xff00) | (szPage>>16);
+ testcase( szPage<=32768 );
+ testcase( szPage>=65536 );
pWal->hdr.mxFrame = iFrame;
if( isCommit ){
pWal->hdr.iChange++;