aboutsummaryrefslogtreecommitdiff
path: root/src/vdbe.c
diff options
context:
space:
mode:
authordrh <>2022-04-13 12:34:54 +0000
committerdrh <>2022-04-13 12:34:54 +0000
commit94e615a6acf3a1519d98e85a6665c712edb5ea8a (patch)
treee163e2a1f8ce85dbbcbe67a247b103f689c5f85d /src/vdbe.c
parent3b79f7580a30e7a49962e9a2538498c65227a4d7 (diff)
parent12c35ec322dc2b394a3a6d8b3997ef60574414a0 (diff)
downloadsqlite-94e615a6acf3a1519d98e85a6665c712edb5ea8a.tar.gz
sqlite-94e615a6acf3a1519d98e85a6665c712edb5ea8a.zip
Add support for RIGHT and FULL OUTER JOINs.
FossilOrigin-Name: fa9d206f904280e3eafc6f4ba6c0c7325948364c62eeeb9f0fdc5825d622ec35
Diffstat (limited to 'src/vdbe.c')
-rw-r--r--src/vdbe.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vdbe.c b/src/vdbe.c
index 18286c297..45a47756e 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -993,8 +993,12 @@ jump_to_p2:
/* Opcode: Return P1 P2 P3 * *
**
-** Jump to the next instruction after the address in register P1. After
-** the jump, register P1 becomes undefined.
+** Jump to the next instruction after the address stored in register P1.
+**
+** It used to be that after the jump, register P1 would become undefined.
+** However, for the subroutine used for the inner loop of a RIGHT JOIN,
+** it is useful for R1 register to be unchanged, so that is what happens
+** now.
**
** P2 is not used by the byte-code engine. However, if P2 is positive
** and also less than the current address, then the "EXPLAIN" output
@@ -1012,7 +1016,7 @@ case OP_Return: { /* in1 */
pIn1 = &aMem[pOp->p1];
assert( pIn1->flags==MEM_Int );
pOp = &aOp[pIn1->u.i];
- pIn1->flags = MEM_Undefined;
+ /* pIn1->flags = MEM_Undefined; */
break;
}