1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Improved optimizations of views as the right operand of a LEFT JOIN.

FossilOrigin-Name: 41c27bc0ff1d3135cdb6273ede4595f5bb0c0e1e1d470ea1633cb525674cf431
This commit is contained in:
drh
2017-04-18 11:20:19 +00:00
9 changed files with 103 additions and 59 deletions

View File

@@ -2431,6 +2431,23 @@ case OP_NotNull: { /* same as TK_NOTNULL, jump, in1 */
break;
}
/* Opcode: IfNullRow P1 P2 P3 * *
** Synopsis: if P1.nullRow then r[P3]=NULL, goto P2
**
** Check the cursor P1 to see if it is currently pointing at a NULL row.
** If it is, then set register P3 to NULL and jump immediately to P2.
** If P1 is not on a NULL row, then fall through without making any
** changes.
*/
case OP_IfNullRow: { /* jump */
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
if( p->apCsr[pOp->p1]->nullRow ){
sqlite3VdbeMemSetNull(aMem + pOp->p3);
goto jump_to_p2;
}
break;
}
/* Opcode: Column P1 P2 P3 P4 P5
** Synopsis: r[P3]=PX
**