Fix mysql tests

This commit is contained in:
hezuojiao 2024-04-26 04:46:59 +00:00 committed by ob-robot
parent b073c1693b
commit c1cc38db65
2 changed files with 1038 additions and 1034 deletions

View File

@ -129,6 +129,10 @@ int ObExprTruncate::calc_result_type2(ObExprResType &type,
precision = 1;
}
type.set_precision(precision);
if (lib::is_mysql_mode() && ob_is_double_tc(type.get_type())) {
type.set_precision(PRECISION_UNKNOWN_YET);
type.set_scale(SCALE_UNKNOWN_YET);
}
} else { /* do nothing */}
} else if (ret == OB_ERR_TRUNCATED_WRONG_VALUE_FOR_FIELD ||
ret == OB_ERR_DATA_TRUNCATED){