~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/ref.cc

  • Committer: Stewart Smith
  • Date: 2010-11-03 03:27:09 UTC
  • mto: (1902.1.1 build) (1910.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1903.
  • Revision ID: stewart@flamingspork.com-20101103032709-oyvfrc6eb8fzj0mr
fix docs warning: docs/unlock.rst:2: (WARNING/2) Title underline too short.

Show diffs side-by-side

added added

removed removed

Lines of Context:
451
451
    switch (result_field->result_type()) {
452
452
    case INT_RESULT:
453
453
      return result_field->val_int() != 0;
454
 
 
455
454
    case DECIMAL_RESULT:
456
 
      {
457
 
        my_decimal decimal_value;
458
 
        my_decimal *val= result_field->val_decimal(&decimal_value);
459
 
        if (val)
460
 
          return !my_decimal_is_zero(val);
461
 
        return 0;
462
 
      }
463
 
 
 
455
    {
 
456
      my_decimal decimal_value;
 
457
      my_decimal *val= result_field->val_decimal(&decimal_value);
 
458
      if (val)
 
459
        return !my_decimal_is_zero(val);
 
460
      return 0;
 
461
    }
464
462
    case REAL_RESULT:
465
463
    case STRING_RESULT:
466
464
      return result_field->val_real() != 0.0;
467
 
 
468
465
    case ROW_RESULT:
 
466
    default:
469
467
      assert(0);
470
468
    }
471
469
  }
472
 
 
473
470
  return val_bool();
474
471
}
475
472