cherry-pick bugfix from 3.1 to open source branch

This commit is contained in:
obdev
2021-07-14 17:48:15 +08:00
committed by wangzelin.wzl
parent 131c2cf658
commit a997b23808
19 changed files with 14233 additions and 14190 deletions

View File

@ -625,8 +625,10 @@ int ObExprSubtime::subtime_varchar(const ObExpr& expr, ObEvalCtx& ctx, ObDatum&
}
} else {
t_val1 = ObTimeConverter::ob_time_to_time(ot1);
if (IS_NEG_TIME(ot1.mode_)) {
t_val1 = -t_val1;
}
}
if (OB_SUCC(ret)) {
int64_t int_usec = t_val1 - t_val2;
const int64_t datetime_buf_len = DATETIME_MAX_LENGTH + 1;