Ensure WHERE clause terms involving tables on the right end of a join
are not prematurely evaluated when tables on the left end of the join
make use of the OR-clause optimization.
Fix for ticket [31338dca7e].
FossilOrigin-Name: 2c2de252666662f5459904fc33a9f2956cbff23c
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 1202971..1e15dbd 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1894,6 +1894,7 @@
#define WHERE_OMIT_OPEN 0x0010 /* Table cursor are already open */
#define WHERE_OMIT_CLOSE 0x0020 /* Omit close of table & index cursors */
#define WHERE_FORCE_TABLE 0x0040 /* Do not use an index-only search */
+#define WHERE_ONETABLE_ONLY 0x0080 /* Only code the 1st table in pTabList */
/*
** The WHERE clause processing routine has two halves. The
@@ -1906,6 +1907,7 @@
Parse *pParse; /* Parsing and code generating context */
u16 wctrlFlags; /* Flags originally passed to sqlite3WhereBegin() */
u8 okOnePass; /* Ok to use one-pass algorithm for UPDATE or DELETE */
+ u8 untestedTerms; /* Not all WHERE terms resolved by outer loop */
SrcList *pTabList; /* List of tables in the join */
int iTop; /* The very beginning of the WHERE loop */
int iContinue; /* Jump here to continue with next record */