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 @@ -1097,6 +1097,11 @@ pub const RESERVED_FOR_TABLE_ALIAS: &[Keyword] = &[
1097
1097
Keyword :: TABLESAMPLE ,
1098
1098
Keyword :: FROM ,
1099
1099
Keyword :: OPEN ,
1100
+ Keyword :: INSERT ,
1101
+ Keyword :: UPDATE ,
1102
+ Keyword :: DELETE ,
1103
+ Keyword :: EXEC ,
1104
+ Keyword :: EXECUTE ,
1100
1105
] ;
1101
1106
1102
1107
/// 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() {
668
668
);
669
669
}
670
670
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
+
671
688
#[test]
672
689
fn parse_analyze() {
673
690
verified_stmt("ANALYZE TABLE test_table");
You can’t perform that action at this time.
0 commit comments