File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -496,6 +496,8 @@ impl<'a> Parser<'a> {
496496 break;
497497 }
498498
499+ // MSSQL: the `GO` keyword is a batch separator which also means it concludes the current statement
500+ // `GO` may not be followed by a semicolon, so turn off that expectation
499501 if expecting_statement_delimiter && word.keyword == Keyword::GO {
500502 expecting_statement_delimiter = false;
501503 }
@@ -508,7 +510,8 @@ impl<'a> Parser<'a> {
508510 }
509511
510512 let statement = self.parse_statement()?;
511- // Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
513+ // MSSQL: the `GO` keyword is a batch separator which also means it concludes the current statement
514+ // `GO` may not be followed by a semicolon, so turn off that expectation
512515 expecting_statement_delimiter = !matches!(statement, Statement::Go(_));
513516 stmts.push(statement);
514517 }
You can’t perform that action at this time.
0 commit comments