Skip to content

Commit 78bc1be

Browse files
move test to mysql tests file
1 parent 0890aee commit 78bc1be

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

src/parser/mod.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16581,23 +16581,6 @@ mod tests {
1658116581
}
1658216582
}
1658316583

16584-
#[test]
16585-
fn test_mysql_srid_create_table() {
16586-
let sql = r#"CREATE TABLE t (a geometry SRID 4326)"#;
16587-
let ast: Vec<Statement> = Parser::parse_sql(&MySqlDialect {}, sql).unwrap();
16588-
16589-
assert_eq!(ast.len(), 1);
16590-
if let Statement::CreateTable(v) = &ast[0] {
16591-
assert_eq!(
16592-
v.columns[0].options[0].option,
16593-
ColumnOption::Srid(Box::new(Expr::value(Value::Number(
16594-
"4326".parse().unwrap(),
16595-
false
16596-
))))
16597-
);
16598-
}
16599-
}
16600-
1660116584
#[test]
1660216585
fn test_replace_into_placeholders() {
1660316586
let sql = "REPLACE INTO t (a) VALUES (&a)";

tests/sqlparser_mysql.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3745,6 +3745,11 @@ fn parse_begin_without_transaction() {
37453745
mysql().verified_stmt("BEGIN");
37463746
}
37473747

3748+
#[test]
3749+
fn parse_geometric_types_srid_option() {
3750+
mysql_and_generic().verified_stmt("CREATE TABLE t (a geometry SRID 4326)");
3751+
}
3752+
37483753
#[test]
37493754
fn parse_double_precision() {
37503755
mysql().verified_stmt("CREATE TABLE foo (bar DOUBLE)");

0 commit comments

Comments
 (0)