diff --git a/sql/field.cc b/sql/field.cc index 9b374c2770d..16c00dfd201 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -7794,7 +7794,8 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs) } Field_blob::store_length(length); - if (table->copy_blobs || length <= MAX_FIELD_WIDTH) + if ((table->copy_blobs || length <= MAX_FIELD_WIDTH) && + from != value.ptr()) { // Must make a copy value.copy(from, length, cs); from= value.ptr();