~kalebral-deactivatedaccount/drizzle/621304

« back to all changes in this revision

Viewing changes to drizzled/field_conv.cc

  • Committer: lbieber
  • Date: 2010-09-23 15:49:15 UTC
  • mfrom: (1788.1.3 build)
  • Revision ID: lbieber@orisndriz08-20100923154915-mshh9pwln0igdwrn
Merge Brian - Rollup patch of enum + style on varchar. This modifies enum to always being the same value.
Merge Stewart - Fix embedded_innodb plugin now that TIMESTAMP is 8 bytes. 
Merge Shrews - fix bug 643630 -  Transaction_reader not handling CHAR values that include quotes properly

Show diffs side-by-side

added added

removed removed

Lines of Context:
688
688
        return do_field_string;
689
689
      else if (to->real_type() == DRIZZLE_TYPE_VARCHAR)
690
690
      {
691
 
        if (((Field_varstring*) to)->length_bytes !=
692
 
            ((Field_varstring*) from)->length_bytes)
 
691
        if (((Field_varstring*) to)->pack_length_no_ptr() !=
 
692
            ((Field_varstring*) from)->pack_length_no_ptr())
693
693
        {
694
694
          return do_field_string;
695
695
        }
696
696
        
697
697
        if (to_length != from_length)
698
698
        {
699
 
          return (((Field_varstring*) to)->length_bytes == 1 ?
 
699
          return (((Field_varstring*) to)->pack_length_no_ptr() == 1 ?
700
700
                  (from->charset()->mbmaxlen == 1 ? do_varstring1 :
701
701
                                                    do_varstring1_mb) :
702
702
                  (from->charset()->mbmaxlen == 1 ? do_varstring2 :
769
769
        from->charset() == to->charset() &&
770
770
        to->getTable()->getShare()->db_low_byte_first == from->getTable()->getShare()->db_low_byte_first &&
771
771
        (!(to->getTable()->in_use->variables.sql_mode & (MODE_NO_ZERO_DATE | MODE_INVALID_DATES)) || (to->type() != DRIZZLE_TYPE_DATE && to->type() != DRIZZLE_TYPE_DATETIME)) &&
772
 
        (from->real_type() != DRIZZLE_TYPE_VARCHAR || ((Field_varstring*)from)->length_bytes == ((Field_varstring*)to)->length_bytes))
 
772
        (from->real_type() != DRIZZLE_TYPE_VARCHAR || ((Field_varstring*)from)->pack_length_no_ptr() == ((Field_varstring*)to)->pack_length_no_ptr()))
773
773
    {                                           // Identical fields
774
774
      /* This may happen if one does 'UPDATE ... SET x=x' */
775
775
      if (to->ptr != from->ptr)