-C Automatically\sgenerated\scomments\son\smany\sVDBE\sopcodes\swhen\sin\sSQLITE_DEBUG\nmost.\s\sComments\sderive\sfrom\sthe\s"Synopsis:"\sfield\sadded\sto\seach\sopcode\ndefinition\sin\svdbe.c.
-D 2013-10-29T20:40:47.279
+C Enhanced\sdisplay\sof\sregister\sranges\sin\sthe\sauxiliary\scomments\sadded\sto\sEXPLAIN.
+D 2013-10-30T00:25:03.220
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 0522b53cdc1fcfc18f3a98e0246add129136c654
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/utf.c 6fc6c88d50448c469c5c196acf21617a24f90269
F src/util.c 2fa6c821d28bbdbeec1b2a7b091a281c9ef8f918
F src/vacuum.c f313bc97123a4dd4bfd3f50a00c4d44c08a5b1b7
-F src/vdbe.c 3d0bd1f8a3ebec1c253c5050c1008bffcbcb21eb
+F src/vdbe.c de4018a314991d41f9b8fb68a17a04471076675d
F src/vdbe.h 4f554b5627f26710c4c36d919110a3fc611ca5c4
F src/vdbeInt.h ff57f67aee1ba26a3a47e786533dab155ab6dad6
F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed
-F src/vdbeaux.c e670a2bd8bf7ba10fad63b9264c5d723c38f02d0
+F src/vdbeaux.c 24deeaf02e8c654af95f83dad6bff79b8bfaf844
F src/vdbeblob.c 5dc79627775bd9a9b494dd956e26297946417d69
F src/vdbemem.c 649933bad3e922465b726eaf85c72a75acba2ab7
F src/vdbesort.c 3937e06b2a0e354500e17dc206ef4c35770a5017
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 3a9e3ed94bf617f00c48009b1a6d348a8f23a3cf
-R cc5dfe91a476c5736a19ee6bb40f8034
+P 5f310c6a22b8bb5f860296074aee130c14101681
+R 56a9cac237ebc2d22a08882e57a2deb0
U drh
-Z 873c3bf640fe9fcbf6a7225bea069855
+Z 31acf4b64a31acd4cd8cd14b574bab97
}
/* Opcode: Move P1 P2 P3 * *
-** Synopsis: r[P2]=r[P1] N=P3
+** Synopsis: r[P2@P3]=r[P1@P3]
**
** Move the values in register P1..P1+P3 over into
** registers P2..P2+P3. Registers P1..P1+P3 are
}
/* Opcode: Copy P1 P2 P3 * *
-** Synopsis: r[P2]=r[P1] N=P3
+** Synopsis: r[P2@P3]=r[P1@P3]
**
** Make a copy of registers P1..P1+P3 into registers P2..P2+P3.
**
}
/* Opcode: Function P1 P2 P3 P4 P5
-** Synopsis: r[P3]=func(r[P2]..) N=P5
+** Synopsis: r[P3]=func(r[P2@P5])
**
** Invoke a user function (P4 is a pointer to a Function structure that
** defines the function) with P5 arguments taken from register P2 and
}
/* Opcode: Affinity P1 P2 * P4 *
-** Synopsis: affinity(r[P1]) N=P2
+** Synopsis: affinity(r[P1@P2])
**
** Apply affinities to a range of P2 registers starting with P1.
**
}
/* Opcode: MakeRecord P1 P2 P3 P4 *
-** Synopsis: r[P3]=rec(r[P1]..) N=P2
+** Synopsis: r[P3]=mkrec(r[P1@P2])
**
** Convert P2 registers beginning with P1 into the [record format]
** use as a data record in a database table or as a key
}
/* Opcode: OpenPseudo P1 P2 P3 * P5
-** Synopsis: content in r[P2].. N=P3
+** Synopsis: content in r[P2@P3]
**
** Open a new cursor that points to a fake table that contains a single
** row of data. The content of that one row in the content of memory
}
/* Opcode: SeekGe P1 P2 P3 P4 *
-** Synopsis: key=r[P3].. N=P4
+** Synopsis: key=r[P3@P4]
**
** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
** use the value in register P3 as the key. If cursor P1 refers
** See also: Found, NotFound, Distinct, SeekLt, SeekGt, SeekLe
*/
/* Opcode: SeekGt P1 P2 P3 P4 *
-** Synopsis: key=r[P3].. N=P4
+** Synopsis: key=r[P3@P4]
**
** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
** use the value in register P3 as a key. If cursor P1 refers
** See also: Found, NotFound, Distinct, SeekLt, SeekGe, SeekLe
*/
/* Opcode: SeekLt P1 P2 P3 P4 *
-** Synopsis: key=r[P3].. N=P4
+** Synopsis: key=r[P3@P4]
**
** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
** use the value in register P3 as a key. If cursor P1 refers
** See also: Found, NotFound, Distinct, SeekGt, SeekGe, SeekLe
*/
/* Opcode: SeekLe P1 P2 P3 P4 *
-** Synopsis: key=r[P3].. N=P4
+** Synopsis: key=r[P3@P4]
**
** If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
** use the value in register P3 as a key. If cursor P1 refers
/* Opcode: Found P1 P2 P3 P4 *
-** Synopsis: key=r[P3].. N=P4
+** Synopsis: key=r[P3@P4]
**
** If P4==0 then register P3 holds a blob constructed by MakeRecord. If
** P4>0 then register P3 is the first of P4 registers that form an unpacked
** P1 is left pointing at the matching entry.
*/
/* Opcode: NotFound P1 P2 P3 P4 *
-** Synopsis: key=r[P3] N=P4
+** Synopsis: key=r[P3@P4]
**
** If P4==0 then register P3 holds a blob constructed by MakeRecord. If
** P4>0 then register P3 is the first of P4 registers that form an unpacked
}
/* Opcode: IdxDelete P1 P2 P3 * *
-** Synopsis: key=r[P2]..
+** Synopsis: key=r[P2@P3]
**
** The content of P3 registers starting at register P2 form
** an unpacked index key. This opcode removes that entry from the
}
/* Opcode: IdxGE P1 P2 P3 P4 P5
-** Synopsis: key=r[P3] N=P4
+** Synopsis: key=r[P3@P4]
**
** The P4 register values beginning with P3 form an unpacked index
** key that omits the ROWID. Compare this key value against the index
** the result is false whereas it would be true with IdxGT.
*/
/* Opcode: IdxLT P1 P2 P3 P4 P5
-** Synopsis: key=r[P3] N=P4
+** Synopsis: key=r[P3@P4]
**
** The P4 register values beginning with P3 form an unpacked index
** key that omits the ROWID. Compare this key value against the index
}
/* Opcode: AggStep * P2 P3 P4 P5
-** Synopsis: accum=r[P3] step(r[P2]..) N=P5
+** Synopsis: accum=r[P3] step(r[P2@P5])
**
** Execute the step function for an aggregate. The
** function has P5 arguments. P4 is a pointer to the FuncDef
#ifndef SQLITE_OMIT_VIRTUALTABLE
/* Opcode: VUpdate P1 P2 P3 P4 *
-** Synopsis: data=r[P3] N=P2
+** Synopsis: data=r[P3@P2]
**
** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
** This opcode invokes the corresponding xUpdate method. P2 values
}
#if defined(SQLITE_DEBUG)
+/*
+** Return an integer value for one of the parameters to the opcode pOp
+** determined by character c.
+*/
+static int translateP(char c, const Op *pOp){
+ if( c=='1' ) return pOp->p1;
+ if( c=='2' ) return pOp->p2;
+ if( c=='3' ) return pOp->p3;
+ if( c=='4' ) return pOp->p4.i;
+ return pOp->p5;
+}
+
/*
** Compute a string for the "comment" field of a VDBE opcode listing
*/
-static int displayComment(Op *pOp, const char *zP4, char *zTemp, int nTemp){
+static int displayComment(
+ const Op *pOp, /* The opcode to be commented */
+ const char *zP4, /* Previously obtained value for P4 */
+ char *zTemp, /* Write result here */
+ int nTemp /* Space available in zTemp[] */
+){
const char *zOpName;
const char *zSynopsis;
int nOpName;
nOpName = sqlite3Strlen30(zOpName);
if( zOpName[nOpName+1] ){
int seenCom = 0;
+ char c;
zSynopsis = zOpName += nOpName + 1;
- for(ii=jj=0; jj<nTemp-1 && zSynopsis[ii]; ii++){
- if( zSynopsis[ii]=='P' ){
- int v;
- const char *zShow = 0;
- ii++;
- switch( zSynopsis[ii] ){
- case '1': v = pOp->p1; break;
- case '2': v = pOp->p2; break;
- case '3': v = pOp->p3; break;
- case '5': v = pOp->p5; break;
- case '4': zShow = zP4; break;
- case 'X': zShow = pOp->zComment; seenCom = 1; break;
- }
- if( zShow ){
- sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zShow);
+ for(ii=jj=0; jj<nTemp-1 && (c = zSynopsis[ii])!=0; ii++){
+ if( c=='P' ){
+ c = zSynopsis[++ii];
+ if( c=='4' ){
+ sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", zP4);
+ }else if( c=='X' ){
+ sqlite3_snprintf(nTemp-jj, zTemp+jj, "%s", pOp->zComment);
+ seenCom = 1;
}else{
- sqlite3_snprintf(nTemp-jj, zTemp+jj, "%d", v);
+ int v1 = translateP(c, pOp);
+ int v2;
+ sqlite3_snprintf(nTemp-jj, zTemp+jj, "%d", v1);
+ if( strncmp(zSynopsis+ii+1, "@P", 2)==0 ){
+ ii += 3;
+ jj += sqlite3Strlen30(zTemp+jj);
+ v2 = translateP(zSynopsis[ii], pOp);
+ if( v2>1 ) sqlite3_snprintf(nTemp-jj, zTemp+jj, "..%d", v1+v2-1);
+ }else if( strncmp(zSynopsis+ii+1, "..P3", 4)==0 && pOp->p3==0 ){
+ ii += 4;
+ }
}
jj += sqlite3Strlen30(zTemp+jj);
}else{
- zTemp[jj++] = zSynopsis[ii];
+ zTemp[jj++] = c;
}
}
if( !seenCom && jj<nTemp-5 && pOp->zComment ){