to issue<51947103>:fix 4016 when using '==' condition operator and pl cache match issue

This commit is contained in:
hanr881
2023-09-01 07:14:36 +00:00
committed by ob-robot
parent 6d8fedae8b
commit 5eed1011a1
2 changed files with 12 additions and 2 deletions

View File

@ -681,10 +681,11 @@ int ObPLObjectValue::match_complex_type_info(const ObPlParamInfo &param_info,
is_same = false;
} else if (param.get_meta().get_extend_type() != param_info.pl_type_) {
is_same = false;
} else if (param_info.pl_type_ == pl::PL_NESTED_TABLE_TYPE ||
} else if ((param_info.pl_type_ == pl::PL_NESTED_TABLE_TYPE ||
param_info.pl_type_ == pl::PL_ASSOCIATIVE_ARRAY_TYPE ||
param_info.pl_type_ == pl::PL_VARRAY_TYPE ||
param_info.pl_type_ == pl::PL_RECORD_TYPE) {
param_info.pl_type_ == pl::PL_RECORD_TYPE) &&
OB_INVALID_ID != param_info.udt_id_) { // may be anonymous array
const pl::ObPLComposite *composite =
reinterpret_cast<const pl::ObPLComposite*>(param.get_ext());
if (OB_ISNULL(composite)) {

View File

@ -1395,6 +1395,15 @@ BEGIN(in_c_comment);
"&&" {return AND_OP;}
"=" {return COMP_EQ;}
"==" {
ParseResult *p = (ParseResult *)yyextra;
if (!p->pl_parse_info_.is_pl_parse_) {
yyerror(yylloc, yyextra, "== operator not in pl context\n");
return PARSER_SYNTAX_ERROR;
} else {
return COMP_EQ;
}
}
":=" {return SET_VAR;}
"<=>" {return COMP_NSEQ;}
">=" {return COMP_GE;}