-C Further\swork\son\sthe\snew\sAPI.\sAll\sthe\sfunctions\sto\sexecute\squeries\sare\sthere\nnow.\s(CVS\s1427)
-D 2004-05-21T10:08:54
+C Pretty-print\sblobs\sin\svdbe-traces.\s(CVS\s1428)
+D 2004-05-21T10:49:48
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/utf.c c27c4f1120f7aaef00cd6942b3d9e3f4ca4fe0e4
F src/util.c 5cbeb452da09cfc7248de9948c15b14d840723f7
F src/vacuum.c c134702e023db8778e6be59ac0ea7b02315b5476
-F src/vdbe.c cafe464b807f480491e4e5212833af1b78e75c3c
+F src/vdbe.c f0e24400884c3e3a5021f60ca2310e7373709e3e
F src/vdbe.h 391d5642a83af686f35c228fcd36cb4456d68f44
F src/vdbeInt.h 8ed2272e97bef20c5302c3b2cb4f900e8b5e2642
-F src/vdbeaux.c bceaa0b9756d547c5dba871676e5cfc19f4f4322
+F src/vdbeaux.c 0a0de6f6097125960b02a3c8625fa896cbc61271
F src/where.c efe5d25fe18cd7381722457898cd863e84097a0c
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
F test/attach.test cb9b884344e6cfa5e165965d5b1adea679a24c83
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P 25643a0137d395572f16cfec3ab3327d913138ba
-R 538616d77e95f3accc922466e9ff1ada
+P fc94575d77f9865e1553bb70c2e3eda2a0b8669e
+R cca19851558a13016ede75fbc3903bef
U danielk1977
-Z d2021785293946a744d708c10c8e94e3
+Z 37206e6737045cd1363c44f5a04c63c9
** 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.313 2004/05/21 10:08:54 danielk1977 Exp $
+** $Id: vdbe.c,v 1.314 2004/05/21 10:49:48 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
}
}
+/*
+** Write a nice string representation of the contents of cell pMem
+** into buffer zBuf, length nBuf.
+*/
+#ifndef NDEBUG
+void prettyPrintMem(Mem *pMem, char *zBuf, int nBuf){
+ char *zCsr = zBuf;
+ int f = pMem->flags;
+
+ if( f&MEM_Blob ){
+ int i;
+ char c;
+ if( f & MEM_Dyn ){
+ c = 'z';
+ assert( (f & (MEM_Static|MEM_Ephem))==0 );
+ }else if( f & MEM_Static ){
+ c = 't';
+ assert( (f & (MEM_Dyn|MEM_Ephem))==0 );
+ }else if( f & MEM_Ephem ){
+ c = 'e';
+ assert( (f & (MEM_Static|MEM_Dyn))==0 );
+ }else{
+ c = 's';
+ }
+
+ zCsr += sprintf(zCsr, "%c[", c);
+ for(i=0; i<16 && i<pMem->n; i++){
+ zCsr += sprintf(zCsr, "%02X ", ((int)pMem->z[i] & 0xFF));
+ }
+ for(i=0; i<16 && i<pMem->n; i++){
+ char z = pMem->z[i];
+ if( z<32 || z>126 ) *zCsr++ = '.';
+ else *zCsr++ = z;
+ }
+
+ zCsr += sprintf(zCsr, "]");
+ }
+
+ *zCsr = '\0';
+}
+#endif
+
/*
** Move data out of a btree key or data field and into a Mem structure.
** The data or key is taken from the entry that pCur is currently pointing
fprintf(p->trace, " i:%lld", pTos[i].i);
}else if( pTos[i].flags & MEM_Real ){
fprintf(p->trace, " r:%g", pTos[i].r);
- }else if( pTos[i].flags & (MEM_Str|MEM_Blob) ){
+ }else if( pTos[i].flags & MEM_Str ){
int j, k;
char zBuf[100];
zBuf[0] = ' ';
zBuf[k++] = 0;
fprintf(p->trace, "%s", zBuf);
}else{
- fprintf(p->trace, " ???");
+ char zBuf[100];
+ prettyPrintMem(pTos, zBuf, 100);
+ fprintf(p->trace, " ");
+ fprintf(p->trace, zBuf);
}
}
if( rc!=0 ) fprintf(p->trace," rc=%d",rc);