Commit 3a7e3f06 authored by hf@deer.(none)'s avatar hf@deer.(none)

embedded library: fix for sending of parameters to stored procedure.

using of methods like sint2korr() doesn't work on Bigendian machines
parent bbfe390a
......@@ -256,8 +256,11 @@ void set_param_short(Item_param *param, uchar **pos, ulong len)
#ifndef EMBEDDED_LIBRARY
if (len < 2)
return;
#endif
int16 value= sint2korr(*pos);
#else
int16 value;
shortget(value, *pos);
#endif
param->set_int(param->unsigned_flag ? (longlong) ((uint16) value) :
(longlong) value);
*pos+= 2;
......@@ -268,8 +271,11 @@ void set_param_int32(Item_param *param, uchar **pos, ulong len)
#ifndef EMBEDDED_LIBRARY
if (len < 4)
return;
#endif
int32 value= sint4korr(*pos);
#else
int32 value;
longget(value, *pos);
#endif
param->set_int(param->unsigned_flag ? (longlong) ((uint32) value) :
(longlong) value);
*pos+= 4;
......@@ -280,9 +286,13 @@ void set_param_int64(Item_param *param, uchar **pos, ulong len)
#ifndef EMBEDDED_LIBRARY
if (len < 8)
return;
#endif
param->set_int((longlong)sint8korr(*pos));
*pos+= 8;
#else
longlong value;
longlongget(value, *pos);
param->set_int(value);
#endif
}
void set_param_float(Item_param *param, uchar **pos, ulong len)
......
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