diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-10-12 00:37:58 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-10-12 00:37:58 +0200 |
commit | dfb74dea300f83880c11600dc726a9cae559f356 (patch) | |
tree | 76da0d6e23f188bc13520bf80496e9053f227d9a /sql/field_conv.cc | |
parent | b785857d00a0fd9c98cb52823357bfad8fb18289 (diff) | |
parent | e7cb032e560e14865941ecdcb553cd3aba856b68 (diff) | |
download | mariadb-git-dfb74dea300f83880c11600dc726a9cae559f356.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 14f2947eba7..0ad8cee0c3b 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -1,7 +1,6 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2010, 2012, Monty Program Ab - + Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2010, 2015, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -906,15 +905,10 @@ int field_conv_incompatible(Field *to, Field *from) { // Be sure the value is stored Field_blob *blob=(Field_blob*) to; from->val_str(&blob->value); - /* - Copy value if copy_blobs is set, or source is not a string and - we have a pointer to its internal string conversion buffer. - */ - if (to->table->copy_blobs || - (!blob->value.is_alloced() && - from_real_type != MYSQL_TYPE_STRING && - from_real_type != MYSQL_TYPE_VARCHAR)) + + if (!blob->value.is_alloced() && from->is_updatable()) blob->value.copy(); + return blob->store(blob->value.ptr(),blob->value.length(),from->charset()); } if (from_real_type == MYSQL_TYPE_ENUM && |