aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2022-04-21 14:48:40 +0000
committerdrh <>2022-04-21 14:48:40 +0000
commit503ad9c72dd28d4175ce1ad1d400d9b62d885afd (patch)
tree6c7a9081208fe993b17441f39b4aa1dc2bbd6cd9 /src/wherecode.c
parent825a6bffc406a274b184da61bca398f86a352bdb (diff)
downloadsqlite-503ad9c72dd28d4175ce1ad1d400d9b62d885afd.tar.gz
sqlite-503ad9c72dd28d4175ce1ad1d400d9b62d885afd.zip
Make sure the code generator knows to invoke row-value subroutines which
running the right-join post-processing loop. FossilOrigin-Name: fd328e52aee1dace12b1c2f44b6f7e9d15d8f77c8e9d9e3d85840a129a4b1808
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 9ba987ca6..4f525a8fb 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -2843,6 +2843,8 @@ SQLITE_NOINLINE void sqlite3WhereRightJoinLoop(
sFrom.nAlloc = 1;
memcpy(&sFrom.a[0], pTabItem, sizeof(SrcItem));
sFrom.a[0].fg.jointype = 0;
+ assert( pParse->withinRJSubrtn < 100 );
+ pParse->withinRJSubrtn++;
pSubWInfo = sqlite3WhereBegin(pParse, &sFrom, pSubWhere, 0, 0, 0,
WHERE_RIGHT_JOIN, 0);
if( pSubWInfo ){
@@ -2875,4 +2877,6 @@ SQLITE_NOINLINE void sqlite3WhereRightJoinLoop(
}
sqlite3ExprDelete(pParse->db, pSubWhere);
ExplainQueryPlanPop(pParse);
+ assert( pParse->withinRJSubrtn>0 );
+ pParse->withinRJSubrtn--;
}