-C Makefile.in\sand\ssqlite.def\schanges\sfor\sencode\sand\snon-toplevel\sbuild;\sticket\s#667\s(CVS\s1297)
-D 2004-03-16T21:49:50
+C The\ssqlite_trace()\sAPI\sonly\sworks\sfor\scommands\sstarted\sby\sthe\suser,\snot\sfor\nSQL\scommands\srun\sduring\sinitialization.\s(CVS\s1298)
+D 2004-03-17T18:44:46
F Makefile.in 5d50a7d2a6a641e90a0312fc30d4e9c96b3903da
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/copy.c 750e13828c3e4a293123e36aaa7cf0f22466248a
F src/date.c f055419d602bde622c70f831350b6b52f2235de0
F src/delete.c 82001c74882319f94dab5f6b92a27311b31092ae
-F src/encode.c e6518a1e3326a07539a88d2082cbaa3389cdf6e0
+F src/encode.c fc8c51f0b61bc803ccdec092e130bebe762b0a2f
F src/expr.c 95ea5d47d11b5085aaeeb77d60b17c2cba13383a
F src/func.c 34fead7a33e82095f6412d3fafd379d47864b3be
F src/hash.c 9b56ef3b291e25168f630d5643a4264ec011c70e
F src/hash.h 3247573ab95b9dd90bcca0307a75d9a16da1ccc7
F src/insert.c c0485ee2d1b99322894e2d1e0b576fd05ed75616
-F src/main.c 8e1b406d661c6475cc27d4b2b9422d1d2ab94cf7
+F src/main.c 89a18cfb2a6a832a03fff10b2515da4bbe8f83ef
F src/md5.c fe4f9c9c6f71dfc26af8da63e4d04489b1430565
F src/os.c 5f11382733805d4529ec2a30800e117f30995ea8
F src/os.h 250a3789be609adfee5c5aa20137ce8683276f24
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P 359f0e787ff2d4d10fd23059e2ce99670e93f66a
-R 844f798d0d4db4bb8c51bd95cdec6c47
-U dougcurrie
-Z e289d5957606d6a682af1d12195f27e6
+P 72205a371ce5be4eac0a77d5d2fa8ccb23bb988f
+R 99d9abce4fbd17d2074c2e743660ebc3
+U drh
+Z 0b52db8f82add9da6aef2ec7c65ba20e
-72205a371ce5be4eac0a77d5d2fa8ccb23bb988f
\ No newline at end of file
+0a12473c4ae370ec34f1f431dd6d7d6ffa25d41a
\ No newline at end of file
** data in an SQLite database. The code in this file is not used by any other
** part of the SQLite library.
**
-** $Id: encode.c,v 1.11 2004/03/14 22:12:00 drh Exp $
+** $Id: encode.c,v 1.12 2004/03/17 18:44:46 drh Exp $
*/
#include <string.h>
#include <assert.h>
** 0x00. This is accomplished by using an escape character to encode
** 0x27 and 0x00 as a two-byte sequence. The escape character is always
** 0x01. An 0x00 is encoded as the two byte sequence 0x01 0x01. The
-** 0x27 character is encoded as the two byte sequence 0x01 0x03. Finally,
+** 0x27 character is encoded as the two byte sequence 0x01 0x28. Finally,
** the escape character itself is encoded as the two-character sequence
** 0x01 0x02.
**
**
** 0x00 -> 0x01 0x01
** 0x01 -> 0x01 0x02
-** 0x27 -> 0x01 0x03
+** 0x27 -> 0x01 0x28
**
** If that were all the encoder did, it would work, but in certain cases
** it could double the size of the encoded string. For example, to
** the offset in step 7 below.
**
** (6) Convert each 0x01 0x01 sequence into a single character 0x00.
-** Convert 0x01 0x02 into 0x01. Convert 0x01 0x03 into 0x27.
+** Convert 0x01 0x02 into 0x01. Convert 0x01 0x28 into 0x27.
**
** (7) Subtract the offset value that was the first character of
** the encoded buffer from all characters in the output buffer.
*/
int sqlite_encode_binary(const unsigned char *in, int n, unsigned char *out){
int i, j, e, m;
+ unsigned char x;
int cnt[256];
if( n<=0 ){
if( out ){
out[0] = e;
j = 1;
for(i=0; i<n; i++){
- int c = (in[i] - e)&0xff;
- if( c==0 || c==1 ){
+ x = in[i] - e;
+ if( x==0 || x==1 || x=='\''){
out[j++] = 1;
- out[j++] = c+1;
- }else if( c=='\'' ){
- out[j++] = 1;
- out[j++] = 3;
- }else{
- out[j++] = c;
+ x++;
}
+ out[j++] = x;
}
out[j] = 0;
assert( j==n+m+1 );
** to decode a string in place.
*/
int sqlite_decode_binary(const unsigned char *in, unsigned char *out){
- int i, c, e;
+ int i, e;
+ unsigned char c;
e = *(in++);
i = 0;
while( (c = *(in++))!=0 ){
if( c==1 ){
- c = *(in++);
- if( c==1 || c==2 ){
- c--;
- }else if( c==3 ){
- c = '\'';
- }else{
- return -1;
- }
+ c = *(in++) - 1;
}
- out[i++] = (c + e)&0xff;
+ out[i++] = c + e;
}
return i;
}
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.162 2004/03/04 19:09:20 rdc Exp $
+** $Id: main.c,v 1.163 2004/03/17 18:44:47 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
memset(&sParse, 0, sizeof(sParse));
sParse.db = db;
sqliteRunParser(&sParse, zSql, pzErrMsg);
- if( db->xTrace ){
+ if( db->xTrace && !db->init.busy ){
/* Trace only the statment that was compiled.
** Make a copy of that part of the SQL string since zSQL is const
** and we must pass a zero terminated string to the trace function