-C Fix\scompiler\swarnings\sin\swhere.c\sand\sin\sthe\sTCL\stest\sharness.\s(CVS\s5994)
-D 2008-12-09T01:32:03
+C Suppress\smore\ssilly\scompiler\swarnings.\s(CVS\s5995)
+D 2008-12-09T02:51:24
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in f7e4c81c347b04f7b0f1c1b081a168645d7b8af7
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/utf.c 3d087d22b7a2d68aee32919713251b30fd327fc0
F src/util.c b9a5d1c4c1a433e17d5828f9717fac763016a2cb
F src/vacuum.c 383d6297bddc011ab04a9eed110db6eaf523e8e9
-F src/vdbe.c c7da2727447ef5ebe9a25ed37796a493fd12d781
+F src/vdbe.c fce160c74aad54d14e2bdd8a30443fd78f7b26c5
F src/vdbe.h 03516f28bf5aca00a53c4dccd6c313f96adb94f6
-F src/vdbeInt.h 1df957ab0f6a129735513d528c930dddfb4b23ef
+F src/vdbeInt.h e6e80a99ce634983b7cc2498843b4d2e5540900a
F src/vdbeapi.c 20722164e7701a0747eaea03cddbbe0de5cb37bf
-F src/vdbeaux.c 9db6b1eb6732ee83afb201b655ff55ff40d3d885
+F src/vdbeaux.c bdf1b3cdf97692eedd4ab4d60510531ab3019683
F src/vdbeblob.c b0dcebfafedcf9c0addc7901ad98f6f986c08935
-F src/vdbemem.c c4da6cee44bbd6e4ecc0129d76330fb16c29d432
+F src/vdbemem.c 4f45d0f86804ffeb7f177e371d75ac2393ee9172
F src/vtab.c 02c51eac45dbff1a1d6e73f58febf92ecb563f7f
F src/walker.c 488c2660e13224ff70c0c82761118efb547f8f0d
F src/where.c c5a21be6d5705d1c2c6f5d56a97785e4752791d2
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 6ed696e7c03351514278338fa986539cf0fac178
-R 3fe0e70cc904e9db4de6bdfc551815cd
+P 680755dbf01e20569b87068b1515b144903c566e
+R 452483eb410c2cf0324867f47deb9f4a
U drh
-Z d05e416df346cbac719aeceaea0b8d01
+Z bea2c8d0137baa91265ec713cd87d014
-680755dbf01e20569b87068b1515b144903c566e
\ No newline at end of file
+1522c2c6677b97edfa09dd64b4f9ed139aeb5bec
\ No newline at end of file
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
-** $Id: vdbe.c,v 1.792 2008/12/06 16:46:14 drh Exp $
+** $Id: vdbe.c,v 1.793 2008/12/09 02:51:24 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
sqlite3_snprintf(100, zCsr, "]%s", encnames[pMem->enc]);
zCsr += strlen(zCsr);
if( f & MEM_Zero ){
- sqlite3_snprintf(100, zCsr,"+%lldz",pMem->u.i);
+ sqlite3_snprintf(100, zCsr,"+%dz",pMem->u.nZero);
zCsr += strlen(zCsr);
}
*zCsr = '\0';
if( pRec->flags & MEM_Zero ){
/* Only pure zero-filled BLOBs can be input to this Opcode.
** We do not allow blobs with a prefix and a zero-filled tail. */
- nZero += pRec->u.i;
+ nZero += pRec->u.nZero;
}else if( len ){
nZero = 0;
}
pOut->flags = MEM_Blob | MEM_Dyn;
pOut->xDel = 0;
if( nZero ){
- pOut->u.i = nZero;
+ pOut->u.nZero = nZero;
pOut->flags |= MEM_Zero;
}
pOut->enc = SQLITE_UTF8; /* In case the blob is ever converted to text */
}else{
int nZero;
if( pData->flags & MEM_Zero ){
- nZero = pData->u.i;
+ nZero = pData->u.nZero;
}else{
nZero = 0;
}
** 6000 lines long) it was split up into several smaller files and
** this header information was factored out.
**
-** $Id: vdbeInt.h,v 1.159 2008/12/04 20:40:10 drh Exp $
+** $Id: vdbeInt.h,v 1.160 2008/12/09 02:51:24 drh Exp $
*/
#ifndef _VDBEINT_H_
#define _VDBEINT_H_
struct Mem {
union {
i64 i; /* Integer value. */
+ int nZero; /* Used when bit MEM_Zero is set in flags */
FuncDef *pDef; /* Used only when flags==MEM_Agg */
RowSet *pRowSet; /* Used only when flags==MEM_RowSet */
} u;
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
-** $Id: vdbeaux.c,v 1.423 2008/12/05 15:24:17 drh Exp $
+** $Id: vdbeaux.c,v 1.424 2008/12/09 02:51:24 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
i = p->nOp;
assert( p->magic==VDBE_MAGIC_INIT );
+ assert( op>0 && op<0xff );
if( p->nOpAlloc<=i ){
if( growOpArray(p) ){
return 0;
}
p->nOp++;
pOp = &p->aOp[i];
- pOp->opcode = op;
+ pOp->opcode = (u8)op;
pOp->p5 = 0;
pOp->p1 = p1;
pOp->p2 = p2;
/* Note: this cast is safe, because the origin data point was an int
** that was cast to a (const char *). */
pOp->p4.i = SQLITE_PTR_TO_INT(zP4);
- pOp->p4type = n;
+ pOp->p4type = P4_INT32;
}else if( zP4==0 ){
pOp->p4.p = 0;
pOp->p4type = P4_NOTUSED;
pOp->p4type = P4_KEYINFO;
}else if( n<0 ){
pOp->p4.p = (void*)zP4;
- pOp->p4type = n;
+ pOp->p4type = (signed char)n;
}else{
- if( n==0 ) n = strlen(zP4);
+ if( n==0 ) n = (int)strlen(zP4);
pOp->p4.z = sqlite3DbStrNDup(p->db, zP4, n);
pOp->p4type = P4_DYNAMIC;
}
int i, j;
KeyInfo *pKeyInfo = pOp->p4.pKeyInfo;
sqlite3_snprintf(nTemp, zTemp, "keyinfo(%d", pKeyInfo->nField);
- i = strlen(zTemp);
+ i = (int)strlen(zTemp);
for(j=0; j<pKeyInfo->nField; j++){
CollSeq *pColl = pKeyInfo->aColl[j];
if( pColl ){
- int n = strlen(pColl->zName);
+ int n = (int)strlen(pColl->zName);
if( i+n>nTemp-6 ){
memcpy(&zTemp[i],",...",4);
break;
if( p && N ){
Mem *pEnd;
sqlite3 *db = p->db;
- int malloc_failed = db->mallocFailed;
+ u8 malloc_failed = db->mallocFailed;
for(pEnd=&p[N]; p<pEnd; p++){
assert( (&p[1])==pEnd || p[0].db==p[1].db );
pMem->flags = MEM_Static|MEM_Str|MEM_Term;
pMem->z = (char*)sqlite3OpcodeName(pOp->opcode); /* Opcode */
assert( pMem->z!=0 );
- pMem->n = strlen(pMem->z);
+ pMem->n = (int)strlen(pMem->z);
pMem->type = SQLITE_TEXT;
pMem->enc = SQLITE_UTF8;
pMem++;
sqlite3VdbeMemSetStr(pMem, z, -1, SQLITE_UTF8, 0);
}else{
assert( pMem->z!=0 );
- pMem->n = strlen(pMem->z);
+ pMem->n = (int)strlen(pMem->z);
pMem->enc = SQLITE_UTF8;
}
pMem->type = SQLITE_TEXT;
if( pOp->zComment ){
pMem->flags = MEM_Str|MEM_Term;
pMem->z = pOp->zComment;
- pMem->n = strlen(pMem->z);
+ pMem->n = (int)strlen(pMem->z);
pMem->enc = SQLITE_UTF8;
pMem->type = SQLITE_TEXT;
}else
if( !needSync && !sqlite3BtreeSyncDisabled(pBt) ){
needSync = 1;
}
- rc = sqlite3OsWrite(pMaster, zFile, strlen(zFile)+1, offset);
+ rc = sqlite3OsWrite(pMaster, zFile, (int)strlen(zFile)+1, offset);
offset += strlen(zFile)+1;
if( rc!=SQLITE_OK ){
sqlite3OsCloseFree(pMaster);
rc = sqlite3BtreeMovetoUnpacked(p->pCursor, 0, p->movetoTarget, 0, &res);
if( rc ) return rc;
p->lastRowid = keyToInt(p->movetoTarget);
- p->rowidIsValid = res==0;
+ p->rowidIsValid = res==0 ?1:0;
if( res<0 ){
rc = sqlite3BtreeNext(p->pCursor, &res);
if( rc ) return rc;
i64 i = pMem->u.i;
u64 u;
if( file_format>=4 && (i&1)==i ){
- return 8+i;
+ return 8+(u32)i;
}
u = i<0 ? -i : i;
if( u<=127 ) return 1;
assert( pMem->db->mallocFailed || flags&(MEM_Str|MEM_Blob) );
n = pMem->n;
if( flags & MEM_Zero ){
- n += pMem->u.i;
+ n += pMem->u.nZero;
}
assert( n>=0 );
return ((n*2) + 12 + ((flags&MEM_Str)!=0));
len = i = sqlite3VdbeSerialTypeLen(serial_type);
assert( len<=nBuf );
while( i-- ){
- buf[i] = (v&0xFF);
+ buf[i] = (u8)(v&0xFF);
v >>= 8;
}
return len;
/* String or blob */
if( serial_type>=12 ){
- assert( pMem->n + ((pMem->flags & MEM_Zero)?pMem->u.i:0)
+ assert( pMem->n + ((pMem->flags & MEM_Zero)?pMem->u.nZero:0)
== sqlite3VdbeSerialTypeLen(serial_type) );
assert( pMem->n<=nBuf );
len = pMem->n;
memcpy(buf, pMem->z, len);
if( pMem->flags & MEM_Zero ){
- len += pMem->u.i;
+ len += pMem->u.nZero;
if( len>nBuf ){
len = nBuf;
}
Mem m, v;
sqlite3BtreeKeySize(pCur, &nCellKey);
- if( nCellKey<=0 ){
+ if( nCellKey<=0 || nCellKey>0x7fffffff ){
return SQLITE_CORRUPT_BKPT;
}
m.flags = 0;
m.db = 0;
m.zMalloc = 0;
- rc = sqlite3VdbeMemFromBtree(pCur, 0, nCellKey, 1, &m);
+ rc = sqlite3VdbeMemFromBtree(pCur, 0, (int)nCellKey, 1, &m);
if( rc ){
return rc;
}
Mem m;
sqlite3BtreeKeySize(pCur, &nCellKey);
- if( nCellKey<=0 ){
+ if( nCellKey<=0 || nCellKey>0x7fffffff ){
*res = 0;
return SQLITE_OK;
}
m.db = 0;
m.flags = 0;
m.zMalloc = 0;
- rc = sqlite3VdbeMemFromBtree(pC->pCursor, 0, nCellKey, 1, &m);
+ rc = sqlite3VdbeMemFromBtree(pC->pCursor, 0, (int)nCellKey, 1, &m);
if( rc ){
return rc;
}
** only within the VDBE. Interface routines refer to a Mem using the
** name sqlite_value
**
-** $Id: vdbemem.c,v 1.129 2008/12/05 23:40:23 drh Exp $
+** $Id: vdbemem.c,v 1.130 2008/12/09 02:51:24 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
/* Set nByte to the number of bytes required to store the expanded blob. */
- nByte = pMem->n + pMem->u.i;
+ nByte = pMem->n + pMem->u.nZero;
if( nByte<=0 ){
nByte = 1;
}
return SQLITE_NOMEM;
}
- memset(&pMem->z[pMem->n], 0, pMem->u.i);
- pMem->n += pMem->u.i;
+ memset(&pMem->z[pMem->n], 0, pMem->u.nZero);
+ pMem->n += pMem->u.nZero;
pMem->flags &= ~(MEM_Zero|MEM_Term);
}
return SQLITE_OK;
assert( fg & MEM_Real );
sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->r);
}
- pMem->n = strlen(pMem->z);
+ pMem->n = (int)strlen(pMem->z);
pMem->enc = SQLITE_UTF8;
pMem->flags |= MEM_Str|MEM_Term;
sqlite3VdbeChangeEncoding(pMem, enc);
pMem->type = SQLITE_BLOB;
pMem->n = 0;
if( n<0 ) n = 0;
- pMem->u.i = n;
+ pMem->u.nZero = n;
pMem->enc = SQLITE_UTF8;
}
if( p->flags & (MEM_Str|MEM_Blob) ){
int n = p->n;
if( p->flags & MEM_Zero ){
- n += p->u.i;
+ n += p->u.nZero;
}
return n>p->db->aLimit[SQLITE_LIMIT_LENGTH];
}
){
int nByte = n; /* New value for pMem->n */
int iLimit; /* Maximum allowed string or blob size */
- int flags = 0; /* New value for pMem->flags */
+ u16 flags = 0; /* New value for pMem->flags */
assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( (pMem->flags & MEM_RowSet)==0 );
if( (f1 & f2 & MEM_Int)==0 ){
double r1, r2;
if( (f1&MEM_Real)==0 ){
- r1 = pMem1->u.i;
+ r1 = (double)pMem1->u.i;
}else{
r1 = pMem1->r;
}
if( (f2&MEM_Real)==0 ){
- r2 = pMem2->u.i;
+ r2 = (double)pMem2->u.i;
}else{
r2 = pMem2->r;
}
}else{
assert( (pVal->flags&MEM_Blob)==0 );
sqlite3VdbeMemStringify(pVal, enc);
- assert( 0==(1&(int)pVal->z) );
+ assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );
}
assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
|| pVal->db->mallocFailed );
Mem *p = (Mem*)pVal;
if( (p->flags & MEM_Blob)!=0 || sqlite3ValueText(pVal, enc) ){
if( p->flags & MEM_Zero ){
- return p->n+p->u.i;
+ return p->n + p->u.nZero;
}else{
return p->n;
}