~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field_conv.cc

  • Committer: Brian Aker
  • Date: 2008-08-14 20:59:41 UTC
  • Revision ID: brian@tangent.org-20080814205941-rdqc6mqguf50mvoq
Remove SET

Show diffs side-by-side

added added

removed removed

Lines of Context:
639
639
          !compatible_db_low_byte_first ||
640
640
          (((to->table->in_use->variables.sql_mode & (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE | MODE_INVALID_DATES)) && to->type() == DRIZZLE_TYPE_NEWDATE) || to->type() == DRIZZLE_TYPE_DATETIME))
641
641
      {
642
 
        if (from->real_type() == DRIZZLE_TYPE_ENUM ||
643
 
            from->real_type() == DRIZZLE_TYPE_SET)
 
642
        if (from->real_type() == DRIZZLE_TYPE_ENUM)
644
643
          if (to->result_type() != STRING_RESULT)
645
644
            return do_field_int;                // Convert SET to number
646
645
        return do_field_string;
647
646
      }
648
 
      if (to->real_type() == DRIZZLE_TYPE_ENUM ||
649
 
          to->real_type() == DRIZZLE_TYPE_SET)
 
647
      if (to->real_type() == DRIZZLE_TYPE_ENUM)
650
648
      {
651
649
        if (!to->eq_def(from))
652
650
        {
728
726
    if (to->pack_length() == from->pack_length() && 
729
727
        !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) && 
730
728
        to->real_type() != DRIZZLE_TYPE_ENUM && 
731
 
        to->real_type() != DRIZZLE_TYPE_SET &&
732
729
        (to->real_type() != DRIZZLE_TYPE_NEWDECIMAL || (to->field_length == from->field_length && (((Field_num*)to)->dec == ((Field_num*)from)->dec))) &&
733
730
        from->charset() == to->charset() &&
734
731
        to->table->s->db_low_byte_first == from->table->s->db_low_byte_first &&
766
763
  }
767
764
  else if ((from->result_type() == STRING_RESULT &&
768
765
            (to->result_type() == STRING_RESULT ||
769
 
             (from->real_type() != DRIZZLE_TYPE_ENUM &&
770
 
              from->real_type() != DRIZZLE_TYPE_SET))))
 
766
             (from->real_type() != DRIZZLE_TYPE_ENUM))))
771
767
  {
772
768
    char buff[MAX_FIELD_WIDTH];
773
769
    String result(buff,sizeof(buff),from->charset());