~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to myisam/mi_key.c

Update needed for SuSE 7.3
Update for autoconf 2.52

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include "myisamdef.h"
20
20
#include "m_ctype.h"
 
21
#ifdef HAVE_IEEEFP_H
 
22
#include <ieeefp.h>
 
23
#endif
21
24
 
22
25
#define CHECK_KEYS
23
26
 
88
91
    }
89
92
    else if (keyseg->flag & HA_SWAP_KEY)
90
93
    {                                           /* Numerical column */
91
 
#ifdef NAN_TEST
92
 
      float float_nr;
93
 
      double dbl_nr;
 
94
#ifdef HAVE_ISNAN
94
95
      if (type == HA_KEYTYPE_FLOAT)
95
96
      {
96
 
        float_nr=float4get(pos);
97
 
        if (float_nr == (float) FLT_MAX)
 
97
        float nr;
 
98
        float4get(nr,pos);
 
99
        if (isnan(nr))
98
100
        {
99
 
          float_nr= (float) FLT_MAX;
100
 
          pos= (byte*) &float_nr;
 
101
          /* Replace NAN with zero */
 
102
          bzero(key,length);
 
103
          key+=length;
 
104
          continue;
101
105
        }
102
106
      }
103
107
      else if (type == HA_KEYTYPE_DOUBLE)
104
108
      {
105
 
        dbl_nr=float8get(key);
106
 
        if (dbl_nr == DBL_MAX)
 
109
        double nr;
 
110
        float8get(nr,pos);
 
111
        if (isnan(nr))
107
112
        {
108
 
          dbl_nr=DBL_MAX;
109
 
          pos=(byte*) &dbl_nr;
 
113
          bzero(key,length);
 
114
          key+=length;
 
115
          continue;
110
116
        }
111
117
      }
112
118
#endif