~drizzle-trunk/drizzle/jenkins-Drizzle-Builder-166

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.cc

  • Committer: Continuous Integration
  • Date: 2013-01-08 12:21:05 UTC
  • mfrom: (2611.1.2 drizzle-7.2)
  • Revision ID: ci@drizzle.org-20130108122105-2tvma6orqzbcabrj
Merge lp:~brianaker/drizzle/fix-warnings Build: jenkins-Drizzle-Builder-151

Show diffs side-by-side

added added

removed removed

Lines of Context:
1189
1189
    {
1190
1190
      owner->null_value= 0;
1191
1191
      if (val1 < val2)  return -1;
1192
 
      if (val1 == val2) return 0;
 
1192
      if (compare_double(val1, val2)) return 0;
1193
1193
      return 1;
1194
1194
    }
1195
1195
  }
1221
1221
  double val2= (*b)->val_real();
1222
1222
  if ((*a)->null_value || (*b)->null_value)
1223
1223
    return test((*a)->null_value && (*b)->null_value);
1224
 
  return test(val1 == val2);
 
1224
  return test(compare_double(val1, val2));
1225
1225
}
1226
1226
 
1227
1227
int Arg_comparator::compare_e_decimal()
1250
1250
    if (!(*b)->null_value)
1251
1251
    {
1252
1252
      owner->null_value= 0;
1253
 
      if (val1 == val2 || fabs(val1 - val2) < precision)
 
1253
      if (compare_double(val1, val2) || fabs(val1 - val2) < precision)
1254
1254
        return 0;
1255
1255
      if (val1 < val2)
1256
1256
        return -1;
1268
1268
  double val2= (*b)->val_real();
1269
1269
  if ((*a)->null_value || (*b)->null_value)
1270
1270
    return test((*a)->null_value && (*b)->null_value);
1271
 
  return test(val1 == val2 || fabs(val1 - val2) < precision);
 
1271
  return test(compare_double(val1, val2) || fabs(val1 - val2) < precision);
1272
1272
}
1273
1273
 
1274
1274
 
3081
3081
 
3082
3082
static int cmp_double(void *, double *a, double *b)
3083
3083
{
3084
 
  return *a < *b ? -1 : *a == *b ? 0 : 1;
 
3084
  return *a < *b ? -1 : compare_double(*a, *b) ? 0 : 1;
3085
3085
}
3086
3086
 
3087
3087
static int cmp_row(void *, cmp_item_row *a, cmp_item_row *b)