File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -513,6 +513,8 @@ impl<'a> Parser<'a> {
513513 break;
514514 }
515515
516+ // MSSQL: the `GO` keyword is a batch separator which also means it concludes the current statement
517+ // `GO` may not be followed by a semicolon, so turn off that expectation
516518 if expecting_statement_delimiter && word.keyword == Keyword::GO {
517519 expecting_statement_delimiter = false;
518520 }
@@ -525,7 +527,8 @@ impl<'a> Parser<'a> {
525527 }
526528
527529 let statement = self.parse_statement()?;
528- // Treat batch delimiter as an end of statement, so no additional statement delimiter expected here
530+ // MSSQL: the `GO` keyword is a batch separator which also means it concludes the current statement
531+ // `GO` may not be followed by a semicolon, so turn off that expectation
529532 expecting_statement_delimiter = !matches!(statement, Statement::Go(_));
530533 stmts.push(statement);
531534 }
You can’t perform that action at this time.
0 commit comments