summaryrefslogtreecommitdiff
path: root/mysys/my_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_handler.c')
-rw-r--r--mysys/my_handler.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysys/my_handler.c b/mysys/my_handler.c
index 360a7666e94..00f25924e69 100644
--- a/mysys/my_handler.c
+++ b/mysys/my_handler.c
@@ -309,6 +309,11 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
case HA_KEYTYPE_FLOAT:
mi_float4get(f_1,a);
mi_float4get(f_2,b);
+ /*
+ The following may give a compiler warning about floating point
+ comparison not being safe, but this is ok in this context as
+ we are bascily doing sorting
+ */
if (piks && (flag = CMP_NUM(f_1,f_2)))
return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag);
a= end;
@@ -317,6 +322,11 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
case HA_KEYTYPE_DOUBLE:
mi_float8get(d_1,a);
mi_float8get(d_2,b);
+ /*
+ The following may give a compiler warning about floating point
+ comparison not being safe, but this is ok in this context as
+ we are bascily doing sorting
+ */
if (piks && (flag = CMP_NUM(d_1,d_2)))
return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag);
a= end;