aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
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--;
}