fix bug core timestamp because of lost error code
This commit is contained in:
@ -216,14 +216,14 @@ int ObExprFromUnixTime::eval_fromtime_normal(const ObExpr &expr,
|
|||||||
usec_val))) {
|
usec_val))) {
|
||||||
LOG_WARN("failed to get_usec_from_datum", K(ret));
|
LOG_WARN("failed to get_usec_from_datum", K(ret));
|
||||||
// warn on fail mode
|
// warn on fail mode
|
||||||
ObCastMode default_cast_mode = CM_NONE;
|
ObCastMode cast_mode = CM_NONE;
|
||||||
if (OB_FAIL(ObSQLUtils::get_default_cast_mode(session->get_stmt_type(), session,
|
int tmp_ret = OB_SUCCESS;
|
||||||
default_cast_mode))) {
|
if (OB_UNLIKELY(OB_SUCCESS != (tmp_ret = ObSQLUtils::get_default_cast_mode(session->get_stmt_type(), session, cast_mode)))) {
|
||||||
LOG_WARN("failed to get default cast mode", K(ret));
|
LOG_WARN("get_default_cast_mode failed", K(tmp_ret), K(session->get_stmt_type()));
|
||||||
} else if (CM_IS_WARN_ON_FAIL(default_cast_mode)) {
|
} else if (CM_IS_WARN_ON_FAIL(cast_mode)) {
|
||||||
ret = OB_SUCCESS;
|
ret = OB_SUCCESS;
|
||||||
expr_datum.set_null();
|
|
||||||
}
|
}
|
||||||
|
expr_datum.set_null();
|
||||||
} else {
|
} else {
|
||||||
ObTime ob_time;
|
ObTime ob_time;
|
||||||
ObDatum tmp_val;
|
ObDatum tmp_val;
|
||||||
|
|||||||
@ -242,14 +242,14 @@ int calc_timestampadd_expr(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &res_datu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (OB_FAIL(ret) && OB_NOT_NULL(session)) {
|
if (OB_FAIL(ret) && OB_NOT_NULL(session)) {
|
||||||
uint64_t cast_mode = 0;
|
ObCastMode cast_mode = CM_NONE;
|
||||||
if (OB_FAIL(ObSQLUtils::get_default_cast_mode(session->get_stmt_type(),
|
int tmp_ret = OB_SUCCESS;
|
||||||
session, cast_mode))) {
|
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(ret), K(session->get_stmt_type()));
|
LOG_WARN("get_default_cast_mode failed", K(tmp_ret), K(session->get_stmt_type()));
|
||||||
} else if (CM_IS_WARN_ON_FAIL(cast_mode)) {
|
} else if (CM_IS_WARN_ON_FAIL(cast_mode)) {
|
||||||
ret = OB_SUCCESS;
|
ret = OB_SUCCESS;
|
||||||
res_datum.set_null();
|
|
||||||
}
|
}
|
||||||
|
res_datum.set_null();
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user