You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){println!("{:?}",
sqlparser::parser::Parser::parse_sql(&sqlparser::dialect::MySqlDialect{},r#"INSERT INTO `example` (`col`) VALUES ('foo \'bar\' baz');"#));}
Instead returning:
Err(ParserError("Expected ), found: bar"))
But I believe it shouldn't — mysqldump generates SQL that is escaped like this, and the docs explicitly mention this as a valid escaping (see Table 9.1).
This is, according to this doc a difference between ANSI SQL and MySQL, but unfortunately this needs to be fixed in the tokenizer, which AFAICT the dialect system doesn't have a way to hook into?
The text was updated successfully, but these errors were encountered:
WesleyAC
changed the title
MySql dialect doesn't handle escaped single quotes
MySql dialect doesn't handle slash-escaped single quotes
Oct 16, 2021
The following fails to parse:
Instead returning:
But I believe it shouldn't —
mysqldump
generates SQL that is escaped like this, and the docs explicitly mention this as a valid escaping (see Table 9.1).This is, according to this doc a difference between ANSI SQL and MySQL, but unfortunately this needs to be fixed in the tokenizer, which AFAICT the dialect system doesn't have a way to hook into?
The text was updated successfully, but these errors were encountered: