/ Check-in [9f8297f8]
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:Suppress the display of the P4 operand in EXPLAIN output when an opcode has been converted into a No-op.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9f8297f862a110ded686d091854fae20c6bc393c
User & Date: drh 2016-01-20 02:36:12
Context
2016-01-20
03:36
Performance improvement in sqlite3DbMallocRaw(). check-in: ff8eadbe user: drh tags: trunk
02:36
Suppress the display of the P4 operand in EXPLAIN output when an opcode has been converted into a No-op. check-in: 9f8297f8 user: drh tags: trunk
02:21
Remove an unnecessary memset() from the symbol name resolver. check-in: da527dda user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

846
847
848
849
850
851
852

853
854
855
856
857
858
859
int sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
  VdbeOp *pOp;
  if( p->db->mallocFailed ) return 0;
  assert( addr>=0 && addr<p->nOp );
  pOp = &p->aOp[addr];
  freeP4(p->db, pOp->p4type, pOp->p4.p);
  pOp->p4type = P4_NOTUSED;

  pOp->opcode = OP_Noop;
  return 1;
}

/*
** 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.







>







846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
int sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
  VdbeOp *pOp;
  if( p->db->mallocFailed ) return 0;
  assert( addr>=0 && addr<p->nOp );
  pOp = &p->aOp[addr];
  freeP4(p->db, pOp->p4type, pOp->p4.p);
  pOp->p4type = P4_NOTUSED;
  pOp->p4.z = 0;
  pOp->opcode = OP_Noop;
  return 1;
}

/*
** 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.