Commit 89c794bd authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

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.
parent 982e77be
...@@ -1296,6 +1296,14 @@ bool Item::send(Protocol *protocol, String *buffer) ...@@ -1296,6 +1296,14 @@ bool Item::send(Protocol *protocol, String *buffer)
result= protocol->store_longlong(nr, unsigned_flag); result= protocol->store_longlong(nr, unsigned_flag);
break; break;
} }
case MYSQL_TYPE_FLOAT:
{
float nr;
nr= val();
if (!null_value)
result= protocol->store(nr, decimals, buffer);
break;
}
case MYSQL_TYPE_DOUBLE: case MYSQL_TYPE_DOUBLE:
{ {
double nr; double nr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment