aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest18
-rw-r--r--manifest.uuid2
-rw-r--r--src/select.c4
-rw-r--r--src/vdbe.h5
-rw-r--r--src/vdbeaux.c22
5 files changed, 25 insertions, 26 deletions
diff --git a/manifest b/manifest
index 0c6b43ff3..ab99b50b1 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\san\sarray\sindex\sthat\sis\sout\sof\sbounds.\s\sTicket\s#1251.\s(CVS\s2462)
-D 2005-05-19T01:26:14
+C Always\suse\sa\smore\sspecific\stype\s(P3_FUNCDEF)\sinstead\sof\sP3_POINTER\sas\sthe\nP3\stype\sof\sa\svdbe\sinstruction.\s(CVS\s2463)
+D 2005-05-19T08:43:00
F Makefile.in 5c00d0037104de2a50ac7647a5f12769795957a3
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -58,7 +58,7 @@ F src/parse.y 3e314b3a96b199b0501ed426f2cee3392ffce806
F src/pragma.c 93d447670b367e7aec9191ed952fe04f6a052eb5
F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
-F src/select.c 5a96555ea29482d0f1ebefe63831a1f4ded562b9
+F src/select.c 43cc2a76e3e00dabc59da82d0dcdef23cdba43a3
F src/shell.c 25b3217d7c64e6497225439d261a253a23efff26
F src/sqlite.h.in 3675e3ada207e09b9d52a0463561325df4ac26b5
F src/sqliteInt.h 7123b9d5632d7eaab90cf595c83c89521ea1c3b6
@@ -76,10 +76,10 @@ F src/utf.c bda5eb85039ef16f2d17004c1e18c96e1ab0a80c
F src/util.c ac74ac096cbe61fe0139f041833a47c97a2dec07
F src/vacuum.c 84a3bebac2c79a1463b98ba35fb9fb6aa2374250
F src/vdbe.c d2574042c44baf6b1016c61e8072dec529ac748a
-F src/vdbe.h 7f586cb6d6b57764e5aac1f87107d6a95ddce24c
+F src/vdbe.h 75e466d84d362b0c4498978a9d6b1e6bd32ecf3b
F src/vdbeInt.h 4afaae2f4adcab54ad2a40dabb2e689fba7b1561
F src/vdbeapi.c 87f363c9c6a32a403d22dda6d594d3548775a0d5
-F src/vdbeaux.c b4d9b9a9d87254a279a88e3f91d0db048071c856
+F src/vdbeaux.c 77dc2e0f8e846269c51342134f3c9720f51707e6
F src/vdbemem.c 4e853ce3151eaf7906150da85a1b3ce1fe5e8da8
F src/where.c f02baff03e2a9ed7bdc36b363b8e4024a94de919
F tclinstaller.tcl 046e3624671962dc50f0481d7c25b38ef803eb42
@@ -279,7 +279,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
-P bfa55bec3233eed899606c309773f441857605ae
-R 6bd0eeb9bbf9503fb459ead1e3a1f2eb
-U drh
-Z d79050c6ee7e2ea7fc2cb669622669c8
+P bcf87e4d1681d6c2856e716aae0135c2b14989d8
+R 495bc2c4e1d599783a8fcd336e029946
+U danielk1977
+Z a163cd3619f69525a187245865ff6728
diff --git a/manifest.uuid b/manifest.uuid
index 2733ebeb5..ac1a11670 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-bcf87e4d1681d6c2856e716aae0135c2b14989d8 \ No newline at end of file
+79a41674be2c0a1990598428d8b1e9d09d3ea389 \ No newline at end of file
diff --git a/src/select.c b/src/select.c
index f72e228d7..e02d28c92 100644
--- a/src/select.c
+++ b/src/select.c
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
-** $Id: select.c,v 1.246 2005/05/16 22:37:55 drh Exp $
+** $Id: select.c,v 1.247 2005/05/19 08:43:00 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -2836,7 +2836,7 @@ int sqlite3Select(
if( !pColl ) pColl = pParse->db->pDfltColl;
sqlite3VdbeOp3(v, OP_CollSeq, 0, 0, (char *)pColl, P3_COLLSEQ);
}
- sqlite3VdbeOp3(v, OP_AggFunc, 0, nExpr, (char*)pDef, P3_POINTER);
+ sqlite3VdbeOp3(v, OP_AggFunc, 0, nExpr, (char*)pDef, P3_FUNCDEF);
}
}
diff --git a/src/vdbe.h b/src/vdbe.h
index 903b67612..31bf8021f 100644
--- a/src/vdbe.h
+++ b/src/vdbe.h
@@ -15,7 +15,7 @@
** or VDBE. The VDBE implements an abstract machine that runs a
** simple program to access and modify the underlying database.
**
-** $Id: vdbe.h,v 1.94 2005/03/23 01:48:48 drh Exp $
+** $Id: vdbe.h,v 1.95 2005/05/19 08:43:00 danielk1977 Exp $
*/
#ifndef _SQLITE_VDBE_H_
#define _SQLITE_VDBE_H_
@@ -38,7 +38,7 @@ struct VdbeOp {
int p1; /* First operand */
int p2; /* Second parameter (often the jump destination) */
char *p3; /* Third parameter */
- int p3type; /* P3_STATIC, P3_DYNAMIC or P3_POINTER */
+ int p3type; /* One of the P3_xxx constants defined below */
#ifdef VDBE_PROFILE
int cnt; /* Number of times this instruction was executed */
long long cycles; /* Total time spend executing this instruction */
@@ -64,7 +64,6 @@ typedef struct VdbeOpList VdbeOpList;
#define P3_NOTUSED 0 /* The P3 parameter is not used */
#define P3_DYNAMIC (-1) /* Pointer to a string obtained from sqliteMalloc() */
#define P3_STATIC (-2) /* Pointer to a static string */
-#define P3_POINTER (-3) /* P3 is a pointer to some structure or object */
#define P3_COLLSEQ (-4) /* P3 is a pointer to a CollSeq structure */
#define P3_FUNCDEF (-5) /* P3 is a pointer to a FuncDef structure */
#define P3_KEYINFO (-6) /* P3 is a pointer to a KeyInfo structure */
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index 260640b34..9e6c9ba01 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -332,12 +332,17 @@ void sqlite3VdbeChangeP2(Vdbe *p, int addr, int val){
** A value of n==0 means copy bytes of zP3 up to and including the
** first null byte. If n>0 then copy n+1 bytes of zP3.
**
-** If n==P3_STATIC it means that zP3 is a pointer to a constant static
-** string and we can just copy the pointer. n==P3_POINTER means zP3 is
-** a pointer to some object other than a string. n==P3_COLLSEQ and
-** n==P3_KEYINFO mean that zP3 is a pointer to a CollSeq or KeyInfo
-** structure. A copy is made of KeyInfo structures into memory obtained
-** from sqliteMalloc.
+** If n==P3_KEYINFO it means that zP3 is a pointer to a KeyInfo structure.
+** A copy is made of the KeyInfo structure into memory obtained from
+** sqliteMalloc, to be freed when the Vdbe is finalized.
+** n==P3_KEYINFO_HANDOFF indicates that zP3 points to a KeyInfo structure
+** stored in memory that the caller has obtained from sqliteMalloc. The
+** caller should not free the allocation, it will be freed when the Vdbe is
+** finalized.
+**
+** Other values of n (P3_STATIC, P3_COLLSEQ etc.) indicate that zP3 points
+** to a string or structure that is guaranteed to exist for the lifetime of
+** the Vdbe. In these cases we can just copy the pointer.
**
** If addr<0 then change P3 on the most recently inserted instruction.
*/
@@ -463,11 +468,6 @@ static char *displayP3(Op *pOp, char *zTemp, int nTemp){
char *zP3;
assert( nTemp>=20 );
switch( pOp->p3type ){
- case P3_POINTER: {
- sprintf(zTemp, "ptr(%#x)", (int)pOp->p3);
- zP3 = zTemp;
- break;
- }
case P3_KEYINFO: {
int i, j;
KeyInfo *pKeyInfo = (KeyInfo*)pOp->p3;