~ubuntu-branches/ubuntu/utopic/mariadb-5.5/utopic-security

« back to all changes in this revision

Viewing changes to sql/field_conv.cc

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2015-06-13 21:09:48 UTC
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20150613210948-0un6au1f6ujj37lv
Tags: upstream-5.5.44
Import upstream version 5.5.44

Show diffs side-by-side

added added

removed removed

Lines of Context:
828
828
 
829
829
int field_conv(Field *to,Field *from)
830
830
{
 
831
  bool blob_type_dest= to->flags & BLOB_FLAG;
831
832
  if (to->real_type() == from->real_type() &&
832
 
      !(to->type() == MYSQL_TYPE_BLOB && to->table->copy_blobs))
 
833
      !(blob_type_dest && to->table->copy_blobs))
833
834
  {
834
835
    if (to->pack_length() == from->pack_length() &&
835
836
        !(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) &&
858
859
      return 0;
859
860
    }
860
861
  }
861
 
  if (to->type() == MYSQL_TYPE_BLOB)
 
862
  if (blob_type_dest)
862
863
  {                                             // Be sure the value is stored
863
864
    Field_blob *blob=(Field_blob*) to;
864
865
    from->val_str(&blob->value);