mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-03 08:01:19 +03:00
In the WhereClause object, do not assume that all TERM_VIRTUAL terms appear
at the end of the list, because that is no longer true. Instead, keep a separate nBase count that is the size of the list excluding the tail of virtual terms. Use nBase instead of nTerm when scanning terms that are not virtual. Add assert()s to validate correctness of WhereClause. FossilOrigin-Name: 6024682ca467fa4fe49608772b0bbfa2f8a419b32cebfa715941073c8b29da49
This commit is contained in:
@@ -320,6 +320,7 @@ struct WhereClause {
|
||||
u8 hasOr; /* True if any a[].eOperator is WO_OR */
|
||||
int nTerm; /* Number of terms */
|
||||
int nSlot; /* Number of entries in a[] */
|
||||
int nBase; /* Number of terms through the last non-Virtual */
|
||||
WhereTerm *a; /* Each a[] describes a term of the WHERE cluase */
|
||||
#if defined(SQLITE_SMALL_STACK)
|
||||
WhereTerm aStatic[1]; /* Initial static space for a[] */
|
||||
|
||||
Reference in New Issue
Block a user