summaryrefslogtreecommitdiff
path: root/sql/field_conv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r--sql/field_conv.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 67ef4f95368..d934e8d007a 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -783,10 +783,12 @@ int field_conv(Field *to,Field *from)
((Field_varstring*)from)->length_bytes ==
((Field_varstring*)to)->length_bytes))
{ // Identical fields
-#ifdef HAVE_valgrind
- /* This may happen if one does 'UPDATE ... SET x=x' */
+ /*
+ This may happen if one does 'UPDATE ... SET x=x'
+ The test is here mostly for valgrind, but can also be relevant
+ if memcpy() is implemented with prefetch-write
+ */
if (to->ptr != from->ptr)
-#endif
memcpy(to->ptr,from->ptr,to->pack_length());
return 0;
}