Fix core at multiset subquery

This commit is contained in:
xianyu-w
2023-10-09 12:39:33 +00:00
committed by ob-robot
parent 86005edbcc
commit 00c32f328e
10 changed files with 16 additions and 20 deletions

View File

@ -835,7 +835,7 @@ int ObExprCast::fill_element(const sql::ObExpr &expr,
} else {
const ObDatum &d = *subquery_datum;
ObObj v, v2;
if (OB_FAIL(d.to_obj(v, expr.args_[0]->obj_meta_, expr.args_[0]->obj_datum_map_))) {
if (OB_FAIL(d.to_obj(v, subquery_row[0]->obj_meta_, subquery_row[0]->obj_datum_map_))) {
LOG_WARN("failed to get obj", K(ret), K(d));
} else if (info->not_null_) {
if (v.is_null()) {

View File

@ -72,7 +72,7 @@ int ObExprSubQueryRef::ExtraInfo::init_cursor_info(ObIAllocator *allocator,
LOG_WARN("fail to alloc memory", K(ret));
} else {
cursor_info = new(buf) ExtraInfo(*allocator, type);
bool result_is_scalar = (expr.get_output_column() == 1 && !expr.is_set() && !expr.is_multiset());
bool result_is_scalar = expr.is_scalar();
if (result_is_scalar) {
cursor_info->scalar_result_type_ = expr.get_result_type();
}