fix bug core timestamp because of lost error code

This commit is contained in:
obdev
2023-02-09 15:50:18 +00:00
committed by ob-robot
parent dddbd9dddd
commit 966b2939b0
2 changed files with 11 additions and 11 deletions

View File

@ -242,14 +242,14 @@ int calc_timestampadd_expr(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &res_datu
}
}
if (OB_FAIL(ret) && OB_NOT_NULL(session)) {
uint64_t cast_mode = 0;
if (OB_FAIL(ObSQLUtils::get_default_cast_mode(session->get_stmt_type(),
session, cast_mode))) {
LOG_WARN("get_default_cast_mode failed", K(ret), K(session->get_stmt_type()));
ObCastMode cast_mode = CM_NONE;
int tmp_ret = OB_SUCCESS;
if (OB_UNLIKELY(OB_SUCCESS != (tmp_ret = ObSQLUtils::get_default_cast_mode(session->get_stmt_type(), session, cast_mode)))) {
LOG_WARN("get_default_cast_mode failed", K(tmp_ret), K(session->get_stmt_type()));
} else if (CM_IS_WARN_ON_FAIL(cast_mode)) {
ret = OB_SUCCESS;
res_datum.set_null();
}
res_datum.set_null();
}
return ret;
}