summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <jani@rhols221.adsl.netsonic.fi>2004-09-07 11:40:27 +0300
committerunknown <jani@rhols221.adsl.netsonic.fi>2004-09-07 11:40:27 +0300
commit2b464cae9b25da31b5152e115ac0a477f98566c6 (patch)
treeeafb32b4edc2332bd559950b96dab3c1414a8765
parent6f46f997b19537e7805dcc618dea16f1bd05ce23 (diff)
downloadmariadb-git-2b464cae9b25da31b5152e115ac0a477f98566c6.tar.gz
Fixed Bug#3645, "PROCEDURE ANALYSE() recommends illegal
FLOAT columns".
-rw-r--r--sql/sql_analyse.cc7
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)