[FEAT MERGE] Support float/double(m, d) in mysql mode

This commit is contained in:
hezuojiao
2022-12-29 12:09:23 +00:00
committed by ob-robot
parent d967637528
commit 26f2754db2
58 changed files with 695 additions and 118 deletions

View File

@ -214,7 +214,8 @@ int ObExprNeg::calc_result_type1(ObExprResType &type, ObExprResType &type1, ObEx
if (type1.get_type() == ObUNumberType) {
type.set_precision(static_cast<int16_t>(type1.get_precision()));
} else {
type.set_precision(static_cast<int16_t>(type1.get_precision() + NEG_PRECISION_OFFSET));
type.set_precision(static_cast<int16_t>(
MIN(type1.get_precision() + NEG_PRECISION_OFFSET, OB_MAX_INTEGER_DISPLAY_WIDTH)));
}
}
}