diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 1 | ||||
-rw-r--r-- | src/vdbeaux.c | 3 | ||||
-rw-r--r-- | src/vdbevtab.c | 7 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index f65caaa8a..585829642 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -3158,6 +3158,7 @@ static int shell_exec( const char *zEQPLine = (const char*)sqlite3_column_text(pExplain,3); int iEqpId = sqlite3_column_int(pExplain, 0); int iParentId = sqlite3_column_int(pExplain, 1); + if( zEQPLine==0 ) zEQPLine = ""; if( zEQPLine[0]=='-' ) eqp_render(pArg); eqp_append(pArg, iEqpId, iParentId, zEQPLine); } diff --git a/src/vdbeaux.c b/src/vdbeaux.c index da8108a59..454be534b 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -1847,7 +1847,8 @@ void sqlite3VdbePrintOp(FILE *pOut, int pc, VdbeOp *pOp){ ** by the mkopcodeh.awk and mkopcodec.awk scripts which extract the ** information from the vdbe.c source text */ fprintf(pOut, zFormat1, pc, - sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, pOp->p3, zP4, pOp->p5, + sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, pOp->p3, + zP4 ? zP4 : "", pOp->p5, zCom ? zCom : "" ); fflush(pOut); diff --git a/src/vdbevtab.c b/src/vdbevtab.c index d97db1c15..95ea0ad22 100644 --- a/src/vdbevtab.c +++ b/src/vdbevtab.c @@ -224,7 +224,6 @@ static int bytecodevtabColumn( if( pIdx->tnum==iRoot ){ pCur->zName = pIdx->zName; pCur->zType = "index"; - break; } } } @@ -268,11 +267,11 @@ static int bytecodevtabColumn( break; case 8: { /* subprog */ Op *aOp = pCur->aOp; + assert( aOp[0].opcode==OP_Init ); + assert( aOp[0].p4.z==0 || strncmp(aOp[0].p4.z,"-" "- ",3)==0 ); if( pCur->iRowid==pCur->iAddr+1 ){ break; /* Result is NULL for the main program */ - }else if( aOp[0].p4type==P4_DYNAMIC - && aOp[0].p4.z!=0 - && strncmp(aOp[0].p4.z,"-- ", 3)==0 ){ + }else if( aOp[0].p4.z!=0 ){ sqlite3_result_text(ctx, aOp[0].p4.z+3, -1, SQLITE_STATIC); }else{ sqlite3_result_text(ctx, "(FK)", 4, SQLITE_STATIC); |