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
SQLStatementScanner turns a trailing comment after the last semicolon into a phantom statement #1895
is split by SQLStatementScanner.allStatements into two statements: SELECT 1 and -- note. The trailing-remainder branch captures the comment as a second statement, so the run goes through the multi-statement path and sends -- note to the server. On ClickHouse this fails with a comment-only query error, and other databases reject it too, so the user sees a spurious "statement 2 failed" error they never wrote.
Fix idea: the scanner (or allStatements) should drop a trailing segment that contains only comments and whitespace. SQLStatementScannerTests needs a case for a trailing comment after the final semicolon.
Activity