diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-03-15 09:07:16 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-03-15 09:07:16 -0300 |
commit | 9fc32c2e2441d254ec21d5b0541e468f9d9dd149 (patch) | |
tree | ea8f12acb4b6e9e5eb3b82ac362a752ed1e80aa9 /sql | |
parent | c7fad393fd73cc941190fde1b56a2f9e68e9d132 (diff) | |
download | mariadb-git-9fc32c2e2441d254ec21d5b0541e468f9d9dd149.tar.gz |
Bug#51289: double Item_cache_decimal::val_real() is broken
Fix up function return value, it must return a double.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index e34905a2e7f..d253e19e068 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -7159,7 +7159,7 @@ double Item_cache_decimal::val_real() DBUG_ASSERT(fixed); double res; if (!value_cached && !cache_value()) - return NULL; + return 0.0; my_decimal2double(E_DEC_FATAL_ERROR, &decimal_value, &res); return res; } |