diff --git a/deps/oblib/src/lib/geo/ob_geo_to_s2_visitor.cpp b/deps/oblib/src/lib/geo/ob_geo_to_s2_visitor.cpp index bcc32607d..524b5cccf 100644 --- a/deps/oblib/src/lib/geo/ob_geo_to_s2_visitor.cpp +++ b/deps/oblib/src/lib/geo/ob_geo_to_s2_visitor.cpp @@ -254,7 +254,8 @@ int ObWkbToS2Visitor::MakeS2Polygon(T_IBIN *geo, S2Polygon *&res) } S2Polygon* py = new S2Polygon(std::move(s2poly)); - if (OB_ISNULL(py)) { + if (OB_FAIL(ret)) { + } else if (OB_ISNULL(py)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("failed to alloc s2cell", K(ret)); } else { @@ -324,7 +325,8 @@ int ObWkbToS2Visitor::MakeProjS2Polygon(T_IBIN *geo, S2Polygon *&res) } S2Polygon* py = new S2Polygon(std::move(s2poly)); - if (OB_ISNULL(py)) { + if (OB_FAIL(ret)) { + } else if (OB_ISNULL(py)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("failed to alloc s2cell", K(ret)); } else { diff --git a/deps/oblib/src/lib/xml/ob_libxml2_sax_handler.cpp b/deps/oblib/src/lib/xml/ob_libxml2_sax_handler.cpp index 7de160ef2..f3964783e 100644 --- a/deps/oblib/src/lib/xml/ob_libxml2_sax_handler.cpp +++ b/deps/oblib/src/lib/xml/ob_libxml2_sax_handler.cpp @@ -227,8 +227,8 @@ void ObLibXml2SaxHandler::characters(void *ctx, const xmlChar *ch, int len) LOG_WARN("get_parser failed", K(ret)); } else if (OB_UNLIKELY(parser->is_stop_parse())) { LOG_INFO("parser is stopped", K(parser->get_last_errno())); - } else if (parser->characters(reinterpret_cast(ch), - len)) { + } else if (OB_FAIL(parser->characters(reinterpret_cast(ch), + len))) { LOG_WARN("parser characters failed", K(ret)); } @@ -246,9 +246,9 @@ void ObLibXml2SaxHandler::cdata_block(void* ctx, const xmlChar* value, int len) LOG_WARN("get_parser failed", K(ret)); } else if (OB_UNLIKELY(parser->is_stop_parse())) { LOG_INFO("parser is stopped", K(parser->get_last_errno())); - } else if (parser->add_text_node(ObMulModeNodeType::M_CDATA, + } else if (OB_FAIL(parser->add_text_node(ObMulModeNodeType::M_CDATA, reinterpret_cast(value), - len)) { + len))) { LOG_WARN("parser cdata block failed", K(ret)); } @@ -268,9 +268,9 @@ void ObLibXml2SaxHandler::comment(void* ctx, const xmlChar* value) LOG_WARN("get_parser failed", K(ret)); } else if (OB_UNLIKELY(parser->is_stop_parse())) { LOG_INFO("parser is stopped", K(parser->get_last_errno())); - } else if (parser->add_text_node(ObMulModeNodeType::M_COMMENT, + } else if (OB_FAIL(parser->add_text_node(ObMulModeNodeType::M_COMMENT, src_value, - STRLEN(src_value))) { + STRLEN(src_value)))) { LOG_WARN("parser comment failed", K(ret)); } diff --git a/deps/oblib/src/lib/xml/ob_multi_mode_interface.cpp b/deps/oblib/src/lib/xml/ob_multi_mode_interface.cpp index 2cf555fc8..07037c706 100644 --- a/deps/oblib/src/lib/xml/ob_multi_mode_interface.cpp +++ b/deps/oblib/src/lib/xml/ob_multi_mode_interface.cpp @@ -644,7 +644,7 @@ int ObIMulModeBase::print_cdata(ObStringBuffer& x_buf, uint32_t format_flag) if (OB_FAIL(get_value(value))) { LOG_WARN("fail to get value.", K(ret)); } else if (format_flag & ObXmlFormatType::PRINT_CDATA_AS_TEXT) { - if (ObXmlParserUtils::escape_xml_text(value, x_buf)) { + if (OB_FAIL(ObXmlParserUtils::escape_xml_text(value, x_buf))) { LOG_WARN("fail to print escape text", K(ret)); } } else if (OB_FAIL(x_buf.append("print(*buffer, 0, 0, 0, CS_TYPE_UTF8MB4_GENERAL_CI))) { LOG_WARN("print_document failed", K(ret)); - } else if (ob_write_string(allocator, buffer->string(), text)) { + } else if (OB_FAIL(ob_write_string(allocator, buffer->string(), text))) { LOG_WARN("ob_write_string failed", K(ret), K(*buffer)); } return ret; diff --git a/src/share/schema/ob_schema_getter_guard.cpp b/src/share/schema/ob_schema_getter_guard.cpp index 478ecd0eb..3e637d4c8 100644 --- a/src/share/schema/ob_schema_getter_guard.cpp +++ b/src/share/schema/ob_schema_getter_guard.cpp @@ -267,6 +267,7 @@ int ObSchemaGetterGuard::get_can_read_index_array( if (OB_FAIL(index_schema->get_spatial_geo_column_id(geo_col_id))) { LOG_WARN("failed to get geometry column id", K(ret)); } else if (OB_ISNULL(geo_column = table_schema->get_column_schema(geo_col_id))) { + ret = OB_ERR_UNEXPECTED; LOG_WARN("failed to get geometry column", K(ret), K(geo_col_id)); } else if (geo_column->is_default_srid()) { is_geo_default_srid = true; diff --git a/src/sql/engine/expr/ob_expr_json_merge_patch.cpp b/src/sql/engine/expr/ob_expr_json_merge_patch.cpp index 16e0aaefd..da5ecba56 100644 --- a/src/sql/engine/expr/ob_expr_json_merge_patch.cpp +++ b/src/sql/engine/expr/ob_expr_json_merge_patch.cpp @@ -395,6 +395,7 @@ int ObExprJsonMergePatch::eval_ora_json_merge_patch(const ObExpr &expr, ObEvalCt if (dst_type == ObVarcharType && length > dst_len) { char res_ptr[OB_MAX_DECIMAL_PRECISION] = {0}; if (OB_ISNULL(ObCharset::lltostr(dst_len, res_ptr, 10, 1))) { + ret = OB_ERR_UNEXPECTED; LOG_WARN("failed to lltostr", K(ret), K(dst_len)); } if (!err_type) {