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

Fix a problem where the loop for the RHS of a LEFT JOIN uses values from an IN() clause as the second or subsequent field of an index.

FossilOrigin-Name: 95ef68966c50f311830cba8c9257a4085c93011d205e0e31867c2917fa62a48e
This commit is contained in:
dan
2020-01-04 16:55:57 +00:00
parent f6ea97ea3d
commit 74ebaadcdd
6 changed files with 70 additions and 17 deletions

View File

@@ -4374,7 +4374,7 @@ seek_not_found:
** Synopsis: seekHit=P2
**
** Set the seekHit flag on cursor P1 to the value in P2.
** The seekHit flag is used by the IfNoHope opcode.
* The seekHit flag is used by the IfNoHope opcode.
**
** P1 must be a valid b-tree cursor. P2 must be a boolean value,
** either 0 or 1.
@@ -4389,6 +4389,19 @@ case OP_SeekHit: {
break;
}
/* Opcode: IfNotOpen P1 P2 * * *
** Synopsis: if( !csr[P1] ) goto P2
**
** If cursor P1 is not open, jump to instruction P2. Otherwise, fall through.
*/
case OP_IfNotOpen: { /* jump */
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
if( !p->apCsr[pOp->p1] ){
goto jump_to_p2_and_check_for_interrupt;
}
break;
}
/* Opcode: Found P1 P2 P3 P4 *
** Synopsis: key=r[P3@P4]
**