diff options
-rw-r--r-- | sql/sql_analyse.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 3847849d6a7..0723c274a17 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -810,6 +810,13 @@ void field_real::get_opt_type(String *answer, if (min_arg >= 0) answer->append(" UNSIGNED"); } + else if (item->decimals == NOT_FIXED_DEC) + { + if (min_arg >= -FLT_MAX && max_arg <= FLT_MAX) + answer->append("FLOAT", 5); + else + answer->append("DOUBLE", 6); + } else { if (min_arg >= -FLT_MAX && max_arg <= FLT_MAX) |