Summary
TCK scenarios match5-25 and match5-26 use two separate MATCH clauses with connected variable-length patterns. After PR #995 removed the nonterminal varlen guard, these queries execute but produce wrong results instead of being rejected.
Repro
match5-25: MATCH (a:A) MATCH (a)-[:LIKES]->()-[:LIKES*3]->(c) RETURN c.name
match5-26: MATCH (a:A) MATCH (a)<-[:LIKES]-()-[:LIKES*3]->(c) RETURN c.name
These go through the reentry match path (two MATCH clauses), which is a different code path from the single connected pattern that PR #995 fixed.
Context
PR #995 correctly handles variable-length rels in single connected patterns via prune_to_endpoints. The reentry match path (query.reentry_matches) was not modified and may need similar pruning.
Related
Summary
TCK scenarios match5-25 and match5-26 use two separate MATCH clauses with connected variable-length patterns. After PR #995 removed the nonterminal varlen guard, these queries execute but produce wrong results instead of being rejected.
Repro
match5-25:
MATCH (a:A) MATCH (a)-[:LIKES]->()-[:LIKES*3]->(c) RETURN c.namematch5-26:
MATCH (a:A) MATCH (a)<-[:LIKES]-()-[:LIKES*3]->(c) RETURN c.nameThese go through the reentry match path (two MATCH clauses), which is a different code path from the single connected pattern that PR #995 fixed.
Context
PR #995 correctly handles variable-length rels in single connected patterns via
prune_to_endpoints. The reentry match path (query.reentry_matches) was not modified and may need similar pruning.Related
success_wrong_rows