~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/ref.cc

  • Committer: LinuxJedi
  • Date: 2010-08-12 17:36:08 UTC
  • mto: (1735.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1736.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100812173608-ccr246iaa8gv3s97
Remove module pointer from registry when module doesn't load to avoid a double-free on shutdown.

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