Index: src/status.c ================================================================== --- src/status.c +++ src/status.c @@ -110,21 +110,26 @@ /* ** Adjust the highwater mark if necessary. ** The caller must hold the appropriate mutex. */ void sqlite3StatusHighwater(int op, int X){ +#if SQLITE_PTRSIZE>4 + sqlite3_int64 newValue = (sqlite3_int64)X; +#else + u32 newValue = (u32)X; +#endif wsdStatInit; assert( op>=0 && op=0 && opwsdStat.mxValue[op] ){ - wsdStat.mxValue[op] = X; + if( newValue>wsdStat.mxValue[op] ){ + wsdStat.mxValue[op] = newValue; } } /* ** Query status information. Index: src/vdbe.c ================================================================== --- src/vdbe.c +++ src/vdbe.c @@ -2368,11 +2368,11 @@ const u8 *zHdr; /* Next unparsed byte of the header */ const u8 *zEndHdr; /* Pointer to first byte after the header */ u32 offset; /* Offset into the data */ u64 offset64; /* 64-bit offset */ u32 avail; /* Number of bytes of available data */ - u32 t; /* A type code from the record header */ + u32 t = 0; /* A type code from the record header */ u16 fx; /* pDest->flags value */ Mem *pReg; /* PseudoTable input register */ p2 = pOp->p2; assert( pOp->p3>0 && pOp->p3<=(p->nMem-p->nCursor) );