Commit 07d4f271 authored by ramil@mysql.com's avatar ramil@mysql.com

Jim's fix for the #10443.

Fix handling of floats and doubles when using prepared statements             
API in the embedded server. 
parent b5379c44
......@@ -306,24 +306,28 @@ static void set_param_int64(Item_param *param, uchar **pos, ulong len)
static void set_param_float(Item_param *param, uchar **pos, ulong len)
{
float data;
#ifndef EMBEDDED_LIBRARY
if (len < 4)
return;
#endif
float data;
float4get(data,*pos);
#else
data= *(float*) *pos;
#endif
param->set_double((double) data);
*pos+= 4;
}
static void set_param_double(Item_param *param, uchar **pos, ulong len)
{
double data;
#ifndef EMBEDDED_LIBRARY
if (len < 8)
return;
#endif
double data;
float8get(data,*pos);
#else
data= *(double*) *pos;
#endif
param->set_double((double) data);
*pos+= 8;
}
......
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