File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1098,6 +1098,11 @@ pub const RESERVED_FOR_TABLE_ALIAS: &[Keyword] = &[
10981098 Keyword :: TABLESAMPLE ,
10991099 Keyword :: FROM ,
11001100 Keyword :: OPEN ,
1101+ Keyword :: INSERT ,
1102+ Keyword :: UPDATE ,
1103+ Keyword :: DELETE ,
1104+ Keyword :: EXEC ,
1105+ Keyword :: EXECUTE ,
11011106] ;
11021107
11031108/// Can't be used as a column alias, so that `SELECT <expr> alias`
Original file line number Diff line number Diff line change @@ -668,6 +668,23 @@ fn parse_select_with_table_alias() {
668668 );
669669}
670670
671+ #[test]
672+ fn parse_consecutive_queries() {
673+ let select_then_exec = "SELECT * FROM deleted; EXECUTE my_sp 'some', 'params'";
674+ let _ = all_dialects()
675+ .parse_sql_statements(select_then_exec)
676+ .unwrap();
677+ let _ = all_dialects_not_requiring_semicolon_statement_delimiter()
678+ .statements_without_semicolons_parse_to(select_then_exec, "");
679+
680+ let select_then_update = "SELECT 1 FROM x; UPDATE y SET z = 1";
681+ let _ = all_dialects()
682+ .parse_sql_statements(select_then_update)
683+ .unwrap();
684+ let _ = all_dialects_not_requiring_semicolon_statement_delimiter()
685+ .statements_without_semicolons_parse_to(select_then_update, "");
686+ }
687+
671688#[test]
672689fn parse_analyze() {
673690 verified_stmt("ANALYZE TABLE test_table");
You can’t perform that action at this time.
0 commit comments