summaryrefslogtreecommitdiff
path: root/storage/myisam/sp_key.c
diff options
context:
space:
mode:
authorndbdev@dl145c.mysql.com <>2005-05-23 10:45:48 +0200
committerndbdev@dl145c.mysql.com <>2005-05-23 10:45:48 +0200
commit30def9f3f878111eb504d77b54d287deb698e452 (patch)
tree3ddbb7a46932f6419027b1a071af6b7cbcdf4c94 /storage/myisam/sp_key.c
parent3efa46046dedbfc5fc4dfc055dc16be68699471d (diff)
parentd68a52377ae4827a5582653da3be76d89ee8417a (diff)
downloadmariadb-git-30def9f3f878111eb504d77b54d287deb698e452.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1
Diffstat (limited to 'storage/myisam/sp_key.c')
-rw-r--r--storage/myisam/sp_key.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/myisam/sp_key.c b/storage/myisam/sp_key.c
index b61e8094cde..1d43f89cba9 100644
--- a/storage/myisam/sp_key.c
+++ b/storage/myisam/sp_key.c
@@ -32,7 +32,11 @@ static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims,
double *mbr, int top);
static int sp_mbr_from_wkb(uchar (*wkb), uint size, uint n_dims, double *mbr);
-
+static void get_double(double *d, const byte *pos)
+{
+ float8get(*d, pos);
+}
+
uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
const byte *record, my_off_t filepos)
{
@@ -80,7 +84,7 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
else if (keyseg->type == HA_KEYTYPE_DOUBLE)
{
double nr;
- float8get(nr, pos);
+ get_double(&nr, pos);
if (isnan(nr))
{
bzero(key, length);
@@ -138,7 +142,7 @@ static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
{
if ((*wkb) > end - 8)
return -1;
- float8get(ord, (*wkb));
+ get_double(&ord, *wkb);
(*wkb)+= 8;
if (ord < *mbr)
float8store((char*) mbr, ord);