Skip to content

Commit 381dec5

Browse files
Merge branch 'main' into pathological2
2 parents 943b300 + 182eae8 commit 381dec5

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/dialect/mysql.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ impl Dialect for MySqlDialect {
216216
fn supports_key_column_option(&self) -> bool {
217217
true
218218
}
219+
220+
/// See: <https://dev.mysql.com/doc/refman/9.7/en/group-by-modifiers.html>
221+
fn supports_group_by_with_modifier(&self) -> bool {
222+
true
223+
}
219224
}
220225

221226
/// `LOCK TABLES`

tests/sqlparser_mysql.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4900,3 +4900,8 @@ fn parse_adjacent_string_literal_concatenation() {
49004900
let sql = r#"SELECT 'M' "y" 'S' "q" 'l'"#;
49014901
mysql().one_statement_parses_to(sql, r"SELECT 'MySql'");
49024902
}
4903+
4904+
#[test]
4905+
fn parse_group_by_with_rollup() {
4906+
mysql().verified_stmt("SELECT * FROM tbl GROUP BY col1, col2 WITH ROLLUP");
4907+
}

0 commit comments

Comments
 (0)