bugfix : ban xml expr in PL mode & xml parse special case xml:lang
This commit is contained in:
@ -41,6 +41,10 @@ int ObExprXmlElement::calc_result_typeN(ObExprResType& type,
|
|||||||
if (OB_UNLIKELY(param_num < 3)) {
|
if (OB_UNLIKELY(param_num < 3)) {
|
||||||
ret = OB_ERR_PARAM_SIZE;
|
ret = OB_ERR_PARAM_SIZE;
|
||||||
LOG_WARN("invalid param number", K(ret), K(param_num));
|
LOG_WARN("invalid param number", K(ret), K(param_num));
|
||||||
|
} else if (!is_called_in_sql()) {
|
||||||
|
ret = OB_ERR_SP_LILABEL_MISMATCH;
|
||||||
|
LOG_WARN("expr call in pl semantics disallowed", K(ret), K(N_XML_ELEMENT));
|
||||||
|
LOG_USER_ERROR(OB_ERR_SP_LILABEL_MISMATCH, static_cast<int>(strlen(N_XML_ELEMENT)), N_XML_ELEMENT);
|
||||||
} else {
|
} else {
|
||||||
// check opt_escaping
|
// check opt_escaping
|
||||||
if (!ob_is_integer_type(types_stack[0].get_type())) {
|
if (!ob_is_integer_type(types_stack[0].get_type())) {
|
||||||
|
|||||||
@ -41,6 +41,10 @@ int ObExprXmlparse::calc_result_typeN(ObExprResType &type,
|
|||||||
if (OB_UNLIKELY(param_num != 4)) {
|
if (OB_UNLIKELY(param_num != 4)) {
|
||||||
ret = OB_ERR_PARAM_SIZE;
|
ret = OB_ERR_PARAM_SIZE;
|
||||||
LOG_WARN("invalid param number", K(ret), K(param_num));
|
LOG_WARN("invalid param number", K(ret), K(param_num));
|
||||||
|
} else if (!is_called_in_sql()) {
|
||||||
|
ret = OB_ERR_SP_LILABEL_MISMATCH;
|
||||||
|
LOG_WARN("expr call in pl semantics disallowed", K(ret), K(N_XMLPARSE));
|
||||||
|
LOG_USER_ERROR(OB_ERR_SP_LILABEL_MISMATCH, static_cast<int>(strlen(N_XMLPARSE)), N_XMLPARSE);
|
||||||
} else {
|
} else {
|
||||||
// param 0 indicate type is document or content
|
// param 0 indicate type is document or content
|
||||||
// param 1 is xml text for parsing
|
// param 1 is xml text for parsing
|
||||||
|
|||||||
Reference in New Issue
Block a user