diff options
author | unknown <bell@sanja.is.com.ua> | 2004-09-01 20:30:48 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-09-01 20:30:48 +0300 |
commit | 321918b3009c4b0443bc3cf4e5eae8a072037b90 (patch) | |
tree | 2807818cfc2363afb96489cd9d8b86e0d7948df3 /sql/item.cc | |
parent | c33897765f0bd4af57d23afad665788c12b774e4 (diff) | |
download | mariadb-git-321918b3009c4b0443bc3cf4e5eae8a072037b90.tar.gz |
fixed printing of real constants (BUG#5160)
mysql-test/r/view.result:
VIEW with floating point (long bumber) as column
mysql-test/t/view.test:
VIEW with floating point (long bumber) as column
sql/item.cc:
fixed printing of real constants
sql/item.h:
fixed printing of real constants
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index 138ab384caf..5b1f0aa39ab 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1756,6 +1756,21 @@ int Item_real::save_in_field(Field *field, bool no_conversions) return field->store(nr); } + +void Item_real::print(String *str) +{ + if (presentation) + { + str->append(presentation); + return; + } + char buffer[20]; + String num(buffer, sizeof(buffer), &my_charset_bin); + num.set(value, decimals, &my_charset_bin); + str->append(num); +} + + /**************************************************************************** ** varbinary item ** In string context this is a binary string |