fix mysql comment fast parser param node isn't equal normal parser param node
This commit is contained in:
@ -1481,12 +1481,19 @@ int ObFastParserBase::process_double_quote()
|
||||
int ObFastParserBase::process_comment_content(bool is_mysql_comment)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
// if is in /*! xxx */ the token tyep should be normal
|
||||
// if is in /*! xxx */ the token type should be normal
|
||||
cur_token_type_ = is_mysql_comment ? NORMAL_TOKEN : IGNORE_TOKEN;
|
||||
bool is_match = false;
|
||||
char ch = raw_sql_.scan();
|
||||
while (!raw_sql_.is_search_end()) {
|
||||
if ('*' == ch && '/' == raw_sql_.peek()) {
|
||||
if (is_mysql_comment && '/' == ch && '*' == raw_sql_.peek()) {
|
||||
raw_sql_.scan();
|
||||
if (OB_FAIL(process_comment_content())) {
|
||||
LOG_WARN("failed to process comment content", K(ret));
|
||||
} else {
|
||||
cur_token_type_ = NORMAL_TOKEN;
|
||||
}
|
||||
} else if ('*' == ch && '/' == raw_sql_.peek()) {
|
||||
// scan '\/'
|
||||
raw_sql_.scan();
|
||||
is_match = true;
|
||||
|
||||
@ -911,6 +911,7 @@ int ObParser::parse_sql(const ObString &stmt,
|
||||
// if is multi_values_parser opt not need retry
|
||||
if (lib::is_mysql_mode() && !parse_result.is_multi_values_parser_) {
|
||||
parse_result.enable_compatible_comment_ = false;
|
||||
parse_result.mysql_compatible_comment_ = false;
|
||||
if (OB_FAIL(sql_parser.parse(stmt.ptr(), stmt.length(), parse_result))) {
|
||||
//do nothing.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user