You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root cause: a WHERE wrapped in redundant parentheses, e.g. (col = @p0 OR col = @p1),
was passed to the single-condition evaluator as one condition, so the operator scan
found '=' with a malformed column name '(col' -> no row matched (0 rows). The
single-file OR/AND splitter and the directory token-walker (EvaluateJoinWhere) both
ignored parentheses at depth > 0, and unrecognized conditions fell through to
'return true' (accept ALL rows).
Fixes:
- SqlInPredicate: add shared StripOuterParentheses + SplitTopLevelLogical helpers
(parenthesis/string-literal aware), used by every WHERE evaluation path.
- SingleFileTable.EvaluateCondition: strip redundant outer parens before OR/AND split;
use the shared splitter (removed private duplicates); unrecognized single conditions
now fail closed (return false) instead of accepting every row.
- Table.EvaluateWhere (directory): strip outer parens and split AND/OR recursively
(parenthesized sub-expressions such as 'a = 1 AND (b = 2 OR c = 3)' now work);
BETWEEN is excluded from the split (contains 'AND').
- SqlParser.EvaluateJoinWhere: strip outer parens (defensive, covers PageBasedScan).
- DatabaseExtensions.EvaluateSingleCondition: fail closed (dead path, same tautology).
Verified: the reporter's probe expectations for multi-value IN/VALUES/OR were
non-discriminating (both values matched all 3 seeded rows, so 3 rows is CORRECT).
New discriminating regression tests (non-matching values) cover literal/param/VALUES
lists, OR, parenthesized OR and AND+OR in single-file + directory + the EF Core
provider path. 1,630 SharpCoreDB.Tests + 116 EF Core tests green.
0 commit comments