1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Fix TRACE7 in os_common.h. (CVS 1765)

FossilOrigin-Name: 76e0b74961af3ff285757ac428b82fe7eaffc025
This commit is contained in:
drh
2004-06-29 13:54:50 +00:00
parent c8c1158be2
commit 4230e2c7f3
4 changed files with 16 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
C Ensure\sthe\stcl\sinterface\sreturns\san\serror\swhen\ssqlite3_create_function()\nfails.\s(CVS\s1764) C Fix\sTRACE7\sin\sos_common.h.\s(CVS\s1765)
D 2004-06-29T13:41:21 D 2004-06-29T13:54:50
F Makefile.in cb7a9889c38723f72b2506c4236ff30a05ff172b F Makefile.in cb7a9889c38723f72b2506c4236ff30a05ff172b
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -41,7 +41,7 @@ F src/legacy.c ad23746f15f67e34577621b1875f639c94839e1f
F src/main.c 95a915b2fe9bd879aa47f80472654f11e033b7a6 F src/main.c 95a915b2fe9bd879aa47f80472654f11e033b7a6
F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070 F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
F src/os.h d1780e0db95cad01f213d48da22ab490eb4fd345 F src/os.h d1780e0db95cad01f213d48da22ab490eb4fd345
F src/os_common.h 1e745e582138c01d995f190d7544da3e826f6b2f F src/os_common.h fe9604754116bd2f2702d58f82d2d8b89998cb21
F src/os_mac.c 3d31e26be1411acfb7961033098631b4f3486fdf F src/os_mac.c 3d31e26be1411acfb7961033098631b4f3486fdf
F src/os_mac.h 51d2445f47e182ed32d3bd6937f81070c6fd9bd4 F src/os_mac.h 51d2445f47e182ed32d3bd6937f81070c6fd9bd4
F src/os_test.c 5ae69ff4f27ed217833825bc836dcdc6cfecba15 F src/os_test.c 5ae69ff4f27ed217833825bc836dcdc6cfecba15
@@ -73,7 +73,7 @@ F src/update.c b66b1896c9da54678ba3eff2bf0b4d291a95986a
F src/utf.c f03535db72bfa09e24202ccdd245f21d2fc65f0a F src/utf.c f03535db72bfa09e24202ccdd245f21d2fc65f0a
F src/util.c 43d0289d49f43c66847ebbeddfb85a2a0d1ddd2d F src/util.c 43d0289d49f43c66847ebbeddfb85a2a0d1ddd2d
F src/vacuum.c 353c7f69dbeb6738434d81798465cc0698844640 F src/vacuum.c 353c7f69dbeb6738434d81798465cc0698844640
F src/vdbe.c dc9d25cb8dcfe23b8fa963af543b9c65eb99c4a5 F src/vdbe.c aa0339933c31e4bb3bb83831a185d60be1060cb5
F src/vdbe.h 75b241c02431b9c0f16eaa9cdbb34146c6287f52 F src/vdbe.h 75b241c02431b9c0f16eaa9cdbb34146c6287f52
F src/vdbeInt.h d83fd7389838453d8392915c21f432014afc99cf F src/vdbeInt.h d83fd7389838453d8392915c21f432014afc99cf
F src/vdbeapi.c ba3722f45db3d3c3509bf5d24f4f868f4c64449d F src/vdbeapi.c ba3722f45db3d3c3509bf5d24f4f868f4c64449d
@@ -232,7 +232,7 @@ F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
F www/version3.tcl 563ba3ac02f64da27ab17f3edbe8e56bfd0293fb F www/version3.tcl 563ba3ac02f64da27ab17f3edbe8e56bfd0293fb
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
P 15a084e9ea14d093f75c54a321f146c18f4453d7 P 357a82cd224e33e11870ad7c2f934c27af682881
R d001e9259ada24a86f646313289cd404 R bf2a126fc83c04e6a2818599eb7607b9
U danielk1977 U drh
Z c7e8ad38efdba3cc87c6775c9f97fb1a Z e226a5c5a0b18ac841dc5c20185e31ab

View File

@@ -1 +1 @@
357a82cd224e33e11870ad7c2f934c27af682881 76e0b74961af3ff285757ac428b82fe7eaffc025

View File

@@ -56,6 +56,7 @@ static unsigned int elapse;
#define TRACE4(X,Y,Z,A) #define TRACE4(X,Y,Z,A)
#define TRACE5(X,Y,Z,A,B) #define TRACE5(X,Y,Z,A,B)
#define TRACE6(X,Y,Z,A,B,C) #define TRACE6(X,Y,Z,A,B,C)
#define TRACE7(X,Y,Z,A,B,C,D)
#endif #endif

View File

@@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing ** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code. ** commenting and indentation practices when changing or adding code.
** **
** $Id: vdbe.c,v 1.393 2004/06/28 13:09:11 danielk1977 Exp $ ** $Id: vdbe.c,v 1.394 2004/06/29 13:54:50 drh Exp $
*/ */
#include "sqliteInt.h" #include "sqliteInt.h"
#include "os.h" #include "os.h"
@@ -985,17 +985,15 @@ case OP_Concat8: {
*/ */
} }
/* Opcode: Concat P1 P2 P3 /* Opcode: Concat P1 P2 *
** **
** Look at the first P1 elements of the stack. Append them all ** Look at the first P1 elements of the stack. Append them all
** together with the lowest element first. Use P3 as a separator. ** together with the lowest element first. The original P1 elements
** Put the result on the top of the stack. The original P1 elements
** are popped from the stack if P2==0 and retained if P2==1. If ** are popped from the stack if P2==0 and retained if P2==1. If
** any element of the stack is NULL, then the result is NULL. ** any element of the stack is NULL, then the result is NULL.
** **
** If P3 is NULL, then use no separator. When P1==1, this routine ** When P1==1, this routine makes a copy of the top stack element
** makes a copy of the top stack element into memory obtained ** into memory obtained from sqliteMalloc().
** from sqliteMalloc().
*/ */
case OP_Concat: { case OP_Concat: {
char *zNew; char *zNew;
@@ -1003,26 +1001,11 @@ case OP_Concat: {
int nField; int nField;
int i, j; int i, j;
Mem *pTerm; Mem *pTerm;
Mem mSep; /* Memory cell containing the seperator string, if any */
if( pOp->p3 ){
mSep.z = pOp->p3;
if( db->enc==SQLITE_UTF8 ){
mSep.n = strlen(mSep.z);
}else{
mSep.n = sqlite3utf16ByteLen(mSep.z, -1);
}
mSep.flags = MEM_Str|MEM_Static|MEM_Term;
mSep.enc = db->enc;
}else{
mSep.flags = MEM_Null;
mSep.n = 0;
}
/* Loop through the stack elements to see how long the result will be. */ /* Loop through the stack elements to see how long the result will be. */
nField = pOp->p1; nField = pOp->p1;
pTerm = &pTos[1-nField]; pTerm = &pTos[1-nField];
nByte = (nField-1)*mSep.n; nByte = 0;
for(i=0; i<nField; i++, pTerm++){ for(i=0; i<nField; i++, pTerm++){
assert( pOp->p2==0 || (pTerm->flags&MEM_Str) ); assert( pOp->p2==0 || (pTerm->flags&MEM_Str) );
if( pTerm->flags&MEM_Null ){ if( pTerm->flags&MEM_Null ){
@@ -1056,10 +1039,6 @@ case OP_Concat: {
assert( pTerm->flags & MEM_Str ); assert( pTerm->flags & MEM_Str );
memcpy(&zNew[j], pTerm->z, n); memcpy(&zNew[j], pTerm->z, n);
j += n; j += n;
if( i<nField-1 && !(mSep.flags|MEM_Null) ){
memcpy(&zNew[j], mSep.z, mSep.n);
j += mSep.n;
}
} }
zNew[j] = 0; zNew[j] = 0;
zNew[j+1] = 0; zNew[j+1] = 0;