We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 393f5ae commit 2fb5863Copy full SHA for 2fb5863
src/parser/mod.rs
@@ -16575,6 +16575,23 @@ mod tests {
16575
}
16576
16577
16578
+ #[test]
16579
+ fn test_mysql_srid_create_table() {
16580
+ let sql = r#"CREATE TABLE t (a geometry SRID 4326)"#;
16581
+ let ast: Vec<Statement> = Parser::parse_sql(&MySqlDialect {}, sql).unwrap();
16582
+
16583
+ assert_eq!(ast.len(), 1);
16584
+ if let Statement::CreateTable(v) = &ast[0] {
16585
+ assert_eq!(
16586
+ v.columns[0].options[0].option,
16587
+ ColumnOption::Srid(Box::new(Expr::value(Value::Number(
16588
+ "4326".parse().unwrap(),
16589
+ false
16590
+ ))))
16591
+ );
16592
+ }
16593
16594
16595
#[test]
16596
fn test_replace_into_placeholders() {
16597
let sql = "REPLACE INTO t (a) VALUES (&a)";
0 commit comments