-C Omit\sthe\s'\\0'\sat\sthe\send\sof\sUTF-8\sstrings\son\sdisk\s(it\sis\simplied).\sAlso\ndon't\sstore\sthe\snumber\sof\srows\sat\sthe\sbeginning\sof\seach\stable\srecord.\s(CVS\s1390)
-D 2004-05-18T01:23:38
+C Bugfix\sfor\srow\sformat.\s(CVS\s1391)
+D 2004-05-18T01:31:14
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/vdbe.c 8a6b971c130227fc90a6e899afe218277aa29fdd
F src/vdbe.h 94457ca73bae972dc61bca33a4dccc2e6e14e2f8
F src/vdbeInt.h 311c2a046ea419781d0ef331198b7b0a65eebc92
-F src/vdbeaux.c 394bde6b1715e28b869d55e5cd90682d87f527e4
+F src/vdbeaux.c 618861394df84d475e574e22b95e6ed1c9453b1d
F src/where.c 5f480219a943b0fed1f6922d2fdbfba8616a9148
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 0f6c9b05e688e281fa168aacdd867db408df2863
-R 9aea282a59c85bfd7c0b6fa8bda19f62
+P 202a470f2c1804a96e69f16709d1a92e405971f0
+R ffc409e8b16e570dc32c405b3b469d03
U danielk1977
-Z 2f567abfa9bbe1670a49c48e7ddc69a6
+Z 5eff88f75ed7e1dd3ba47379b0123d5b
return 5;
}
if( flags&MEM_Str ){
- return (pMem->n*2 + 13);
+ /* We assume that the string is NULL-terminated. We don't store the
+ ** NULL-terminator - it is implied by the string storage class.
+ */
+ assert( pMem->n>0 );
+ assert( pMem->z[pMem->n-1]=='\0' );
+ return (pMem->n*2 + 11); /* (pMem->n-1)*2 + 13 */
}
if( flags&MEM_Blob ){
return (pMem->n*2 + 12);
/* String or blob */
assert( serial_type>=12 );
+ len = sqlite3VdbeSerialTypeLen(serial_type);
if( serial_type&0x01 ){
pMem->flags = MEM_Str;
+ pMem->n = len+1;
}else{
pMem->flags = MEM_Blob;
+ pMem->n = len;
}
- len = sqlite3VdbeSerialTypeLen(serial_type);
- pMem->n = len;
- if( len>NBFS ){
- pMem->z = sqliteMallocRaw( len );
+
+ if( (pMem->n)>NBFS ){
+ pMem->z = sqliteMallocRaw( pMem->n );
if( !pMem->z ){
return -1;
}
pMem->z = pMem->zShort;
pMem->flags |= MEM_Short;
}
+
memcpy(pMem->z, buf, len);
+ if( pMem->flags&MEM_Str ){
+ pMem->z[len] = '\0';
+ }
return len;
}
return 0;
}
+/*
+** This function compares the two table row records specified by
+** {nKey1, pKey1} and {nKey2, pKey2}, returning a negative, zero
+** or positive integer if {nKey1, pKey1} is less than, equal to or
+** greater than {nKey2, pKey2}.
+**
+** This function is pretty inefficient and will probably be replace
+** by something else in the near future. It is currently required
+** by compound SELECT operators.
+*/
+int sqlite3VdbeRowCompare(
+ void *userData,
+ int nKey1, const void *pKey1,
+ int nKey2, const void *pKey2
+){
+ int offset1 = 0;
+ int offset2 = 0;
+ const unsigned char *aKey1 = (const unsigned char *)pKey1;
+ const unsigned char *aKey2 = (const unsigned char *)pKey2;
+
+ assert( userData==0 );
+}
+
+
/*
** pCur points at an index entry. Read the rowid (varint occuring at
** the end of the entry and store it in *rowid. Return SQLITE_OK if