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
{{ message }}
Repository navigation
Review #2187 for code improvements: IN (SELECT ...) takes every subquery parsed before it #2708
This is not a bug report. It is an invitation to look at #2187 again, because it starts giving a SELECT its own subqueries, but takes too many. The goal is to understand the change and decide whether anything should be improved. The notes below come from a quick read of the diff and a few runs, not from a full analysis.
The concern:
The IN subquery takes every subquery parsed so far. The grammar actions for IN (SELECT …), NOT IN (SELECT …) and op ALL/ANY (SELECT …) move all of yy.queries into the inner SELECT, including subqueries that belong to the outer statement and came earlier in the text. compileQueries (src/40select.js) then compiles that list for the inner SELECT. The wrong results this causes are in A subquery before IN (SELECT ...) is evaluated as the wrong subquery #2707.
Activity
mathiasrw commentedon Nov 26, 2026
Will be covered by #2666.