summaryrefslogtreecommitdiff
path: root/myisam/mi_key.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-01-26 01:19:47 +0200
committerunknown <monty@hundin.mysql.fi>2002-01-26 01:19:47 +0200
commit48ff048f8f2235508eb0579975611a805b34e24c (patch)
tree5ccc31c365805428193f80c2e7fe45e9c87a8173 /myisam/mi_key.c
parenta1014a4f3a9f76fe0bcfae785bd72ef9a77e4821 (diff)
downloadmariadb-git-48ff048f8f2235508eb0579975611a805b34e24c.tar.gz
Update needed for SuSE 7.3
Update for autoconf 2.52 BitKeeper/deleted/.del-compile-pentium-symbols~b1b0f0b465eb15b8: Delete: BUILD/compile-pentium-symbols BUILD/Makefile.am: Remove not used scripts BUILD/SETUP.sh: Update needed for SuSE 7.3 BUILD/compile-alpha: Update needed for SuSE 7.3 BUILD/compile-pentium-debug-no-bdb: Update needed for SuSE 7.3 BUILD/compile-pentium-gcov: Update needed for SuSE 7.3 BUILD/compile-pentium-gprof: Update needed for SuSE 7.3 BUILD/compile-pentium-mysqlfs-debug: Update needed for SuSE 7.3 BUILD/compile-pentium: Update needed for SuSE 7.3 Docs/manual.texi: changelog Docs/mysqld_error.txt: New error messages. acconfig.h: Update to autoconf 2.52 acinclude.m4: Update to autoconf 2.52 bdb/dist/configure.in: Update to autoconf 2.52 configure.in: Update to autoconf 2.52 myisam/mi_check.c: Fix for myisamchk bug when reparing table with many keys. myisam/mi_key.c: Fix problem with NAN in key's scripts/Makefile.am: Fix for autoconf 2.52 scripts/mysql_new_fix_privilege_tables.sh: cleanup
Diffstat (limited to 'myisam/mi_key.c')
-rw-r--r--myisam/mi_key.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/myisam/mi_key.c b/myisam/mi_key.c
index 7c53c2d3726..6ec8668ab61 100644
--- a/myisam/mi_key.c
+++ b/myisam/mi_key.c
@@ -18,6 +18,9 @@
#include "myisamdef.h"
#include "m_ctype.h"
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
#define CHECK_KEYS
@@ -88,25 +91,28 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
}
else if (keyseg->flag & HA_SWAP_KEY)
{ /* Numerical column */
-#ifdef NAN_TEST
- float float_nr;
- double dbl_nr;
+#ifdef HAVE_ISNAN
if (type == HA_KEYTYPE_FLOAT)
{
- float_nr=float4get(pos);
- if (float_nr == (float) FLT_MAX)
+ float nr;
+ float4get(nr,pos);
+ if (isnan(nr))
{
- float_nr= (float) FLT_MAX;
- pos= (byte*) &float_nr;
+ /* Replace NAN with zero */
+ bzero(key,length);
+ key+=length;
+ continue;
}
}
else if (type == HA_KEYTYPE_DOUBLE)
{
- dbl_nr=float8get(key);
- if (dbl_nr == DBL_MAX)
+ double nr;
+ float8get(nr,pos);
+ if (isnan(nr))
{
- dbl_nr=DBL_MAX;
- pos=(byte*) &dbl_nr;
+ bzero(key,length);
+ key+=length;
+ continue;
}
}
#endif