[CP] fix invalid keypart bug
This commit is contained in:
@ -1174,6 +1174,12 @@ int ObKeyPart::formalize_keypart(bool contain_row)
|
||||
LOG_WARN("failed to adjust in param values", K(ret));
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret) && is_in_key() &&
|
||||
(in_keypart_->in_params_.empty() || in_keypart_->get_param_val_cnt() == 0)) {
|
||||
if (OB_FAIL(convert_to_true_or_false(false))) {
|
||||
LOG_WARN("failed to convert to always true");
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2877,7 +2877,10 @@ int ObQueryRange::get_multi_in_key_part(const ObOpRawExpr *l_expr,
|
||||
LOG_WARN("failed to adjust in param values", K(ret));
|
||||
} else if (OB_FAIL(tmp_key_part->formalize_keypart(contain_row_))) {
|
||||
LOG_WARN("failed to formalize in key", K(ret));
|
||||
} else {
|
||||
} else if (tmp_key_part->is_always_true() || tmp_key_part->is_always_false()) {
|
||||
query_range_ctx_->cur_expr_is_precise_ = false;
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
out_key_part = tmp_key_part;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user