summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-10-20 18:52:45 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-10-20 18:52:45 +0500
commit30743b966563bfd3a543f1df428de5a75a1d5ee5 (patch)
tree0ad2d639dfacf04a2cd9378f504ba19cd3ee8785 /sql
parent2a98f2943e1a4548d3e7fa20d2e517a11c021556 (diff)
downloadmariadb-git-30743b966563bfd3a543f1df428de5a75a1d5ee5.tar.gz
Fix for:
http://bugs.mysql.com/bug.php?id=1022 Description: When a table contains a 'float' field, and one of the functions MAX, MIN, or AVG is used on that field, the system crashes.
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 4de4951cb51..127c0a36da4 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1296,6 +1296,14 @@ bool Item::send(Protocol *protocol, String *buffer)
result= protocol->store_longlong(nr, unsigned_flag);
break;
}
+ case MYSQL_TYPE_FLOAT:
+ {
+ float nr;
+ nr= val();
+ if (!null_value)
+ result= protocol->store(nr, decimals, buffer);
+ break;
+ }
case MYSQL_TYPE_DOUBLE:
{
double nr;