提交 4132ca46 编写于 作者: M Monk-Liu 提交者: wangzelin.wzl

[bugfix][sql_mode]: support ANSI_QUOTES sql_mode in fast_parser.

上级 5ecd5ab4
......@@ -1892,11 +1892,16 @@ int ObFastParserMysql::process_string(const char quote)
}
} // end while
if (OB_SUCC(ret)) {
// in ansi_quotes sql_mode, the "" is treated as `, shouldn't parameterize it.
bool is_ansi_quotes = false;
IS_ANSI_QUOTES(sql_mode_, is_ansi_quotes);
raw_sql_.scan();
if (!is_quote_end) {
cur_token_type_ = IGNORE_TOKEN;
ret = OB_ERR_PARSER_SYNTAX;
LOG_WARN("parser syntax error", K(ret), K(raw_sql_.to_string()), K_(raw_sql_.cur_pos));
} else if (is_ansi_quotes && quote == '"') {
cur_token_type_ = IGNORE_TOKEN;
} else {
char *buf = nullptr;
cur_token_type_ = PARAM_TOKEN;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册