[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

@ -100,7 +100,11 @@ int ObExprCeilFloor::calc_result_type1(ObExprResType &type,
//no need to test ret here
// scale
type.set_scale(0);
type.set_precision(type1.get_precision());
if (lib::is_mysql_mode() && type.is_double()) {
type.set_precision(17); // float length of 0
} else {
type.set_precision(type1.get_precision());
}
}
ObExprOperator::calc_result_flag1(type, type1);