File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1088,6 +1088,11 @@ pub const RESERVED_FOR_TABLE_ALIAS: &[Keyword] = &[
1088
1088
Keyword :: TABLESAMPLE ,
1089
1089
Keyword :: FROM ,
1090
1090
Keyword :: OPEN ,
1091
+ Keyword :: INSERT ,
1092
+ Keyword :: UPDATE ,
1093
+ Keyword :: DELETE ,
1094
+ Keyword :: EXEC ,
1095
+ Keyword :: EXECUTE ,
1091
1096
] ;
1092
1097
1093
1098
/// Can't be used as a column alias, so that `SELECT <expr> alias`
Original file line number Diff line number Diff line change @@ -666,6 +666,23 @@ fn parse_select_with_table_alias() {
666
666
);
667
667
}
668
668
669
+ #[test]
670
+ fn parse_consecutive_queries() {
671
+ let select_then_exec = "SELECT * FROM deleted; EXECUTE my_sp 'some', 'params'";
672
+ let _ = all_dialects()
673
+ .parse_sql_statements(select_then_exec)
674
+ .unwrap();
675
+ let _ = all_dialects_not_requiring_semicolon_statement_delimiter()
676
+ .statements_without_semicolons_parse_to(select_then_exec, "");
677
+
678
+ let select_then_update = "SELECT 1 FROM x; UPDATE y SET z = 1";
679
+ let _ = all_dialects()
680
+ .parse_sql_statements(select_then_update)
681
+ .unwrap();
682
+ let _ = all_dialects_not_requiring_semicolon_statement_delimiter()
683
+ .statements_without_semicolons_parse_to(select_then_update, "");
684
+ }
685
+
669
686
#[test]
670
687
fn parse_analyze() {
671
688
verified_stmt("ANALYZE TABLE test_table");
You can’t perform that action at this time.
0 commit comments