/ Check-in [7fb16268]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the header comment in sqlite3VdbeDeletePriorOpcode(). No changes to code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7fb1626866c2f8dad84c7e6184824be3efd71ca2
User & Date: drh 2014-09-29 15:42:01
Context
2014-09-30
12:33
Remove the SQLITE_ENABLE_TREE_EXPLAIN compile-time option. Add alternative debugging display routines: sqlite3TreeViewExpr(), sqlite3TreeViewExprList(), and sqlite3TreeViewSelect(). check-in: 4ff51325 user: drh tags: trunk
2014-09-29
18:47
Add the OPFLAG_MULTICOLUMN flag to the OP_Column opcode. Rearrange OP_Column instructions to take advantage of the new flag for a small performance increase Leaf check-in: 5e5d6e86 user: drh tags: faster-OP_Column
15:42
Fix the header comment in sqlite3VdbeDeletePriorOpcode(). No changes to code. check-in: 7fb16268 user: drh tags: trunk
15:00
Ensure that the OP_Prev opcode verifies that content has not been deleted out from under the cursor. Fix for ticket [209d31e3161b9e9ff]. check-in: 414f0d6a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

748
749
750
751
752
753
754
755

756
757
758
759
760
761
762
    memset(pOp, 0, sizeof(pOp[0]));
    pOp->opcode = OP_Noop;
    if( addr==p->nOp-1 ) p->nOp--;
  }
}

/*
** Remove the last opcode inserted

*/
int sqlite3VdbeDeletePriorOpcode(Vdbe *p, u8 op){
  if( (p->nOp-1)>(p->pParse->iFixedOp) && p->aOp[p->nOp-1].opcode==op ){
    sqlite3VdbeChangeToNoop(p, p->nOp-1);
    return 1;
  }else{
    return 0;







|
>







748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
    memset(pOp, 0, sizeof(pOp[0]));
    pOp->opcode = OP_Noop;
    if( addr==p->nOp-1 ) p->nOp--;
  }
}

/*
** If the last opcode is "op" and it is not a jump destination,
** then remove it.  Return true if and only if an opcode was removed.
*/
int sqlite3VdbeDeletePriorOpcode(Vdbe *p, u8 op){
  if( (p->nOp-1)>(p->pParse->iFixedOp) && p->aOp[p->nOp-1].opcode==op ){
    sqlite3VdbeChangeToNoop(p, p->nOp-1);
    return 1;
  }else{
    return 0;