[FEAT MERGE] patch 423 sql compatible features to 432
Co-authored-by: akaError <lzg020616@163.com> Co-authored-by: JinmaoLi <ljm.csmaster@gmail.com> Co-authored-by: qingzhu521 <q15000557748@gmail.com>
This commit is contained in:
@ -2518,6 +2518,20 @@ int ObFastParserMysql::process_identifier_begin_with_n()
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObFastParserMysql::process_identifier_begin_with_backslash()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (raw_sql_.char_at(raw_sql_.cur_pos_) == 'N') {
|
||||
raw_sql_.scan(1);
|
||||
if (-1 == is_identifier_flags(raw_sql_.cur_pos_)) {
|
||||
cur_token_type_ = PARAM_TOKEN;
|
||||
OZ (add_null_type_node());
|
||||
}
|
||||
} else {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObFastParserMysql::process_values(const char *str)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -2647,6 +2661,10 @@ int ObFastParserMysql::process_identifier(bool is_number_begin)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case '\\': {
|
||||
OZ (process_identifier_begin_with_backslash());
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
@ -2805,6 +2823,11 @@ int ObFastParserMysql::parse_next_token()
|
||||
if (OB_LIKELY(process_idf_func_ != nullptr)) {
|
||||
OZ ((this->*process_idf_func_)(false));
|
||||
}
|
||||
} else if (is_mysql_mode() && raw_sql_.char_at(raw_sql_.cur_pos_) == '\\') {
|
||||
raw_sql_.cur_pos_ += 1;
|
||||
if (OB_LIKELY(process_idf_func_ != nullptr)) {
|
||||
OZ ((this->*process_idf_func_)(false));
|
||||
}
|
||||
} else if (is_normal_char(ch)) {
|
||||
cur_token_type_ = NORMAL_TOKEN;
|
||||
raw_sql_.scan();
|
||||
|
||||
Reference in New Issue
Block a user