aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2022-04-23 18:04:31 +0000
committerdrh <>2022-04-23 18:04:31 +0000
commitb77c31295687dd33cc4b8955d29cd0b26fbae6a3 (patch)
tree56c6af1134287988222adcf82b2ac652f1062fe9 /src/wherecode.c
parentd6bb6000eff360f76d736d13331816354d880c5f (diff)
downloadsqlite-b77c31295687dd33cc4b8955d29cd0b26fbae6a3.tar.gz
sqlite-b77c31295687dd33cc4b8955d29cd0b26fbae6a3.zip
For debug builds, if the RIGHT JOIN body subroutine contains a jump that
escapes the subroutine, then abort the prepared statement with a descriptive error and SQLITE_INTERNAL. This extra sanity check causes many tests to fail. FossilOrigin-Name: 2c5bb2bff26cc70d8cac78ddd12d5ac37ab1472f5f88afbd975950a18ac2804d
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 4f525a8fb..3ea6c5d8e 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -2819,6 +2819,8 @@ SQLITE_NOINLINE void sqlite3WhereRightJoinLoop(
int k;
ExplainQueryPlan((pParse, 1, "RIGHT-JOIN %s", pTabItem->pTab->zName));
+ sqlite3VdbeNoJumpsOutsideSubrtn(v, pRJ->addrSubrtn, pRJ->endSubrtn,
+ pRJ->regReturn);
for(k=0; k<iLevel; k++){
int iIdxCur;
mAll |= pWInfo->a[k].pWLoop->maskSelf;