mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix for Bug#56138 "valgrind errors about overlapping memory when double-assigning same variable",
and related small fixes.
This commit is contained in:
@ -786,11 +786,8 @@ int field_conv(Field *to,Field *from)
|
||||
((Field_varstring*)from)->length_bytes ==
|
||||
((Field_varstring*)to)->length_bytes))
|
||||
{ // Identical fields
|
||||
#ifdef HAVE_purify
|
||||
/* This may happen if one does 'UPDATE ... SET x=x' */
|
||||
if (to->ptr != from->ptr)
|
||||
#endif
|
||||
memcpy(to->ptr,from->ptr,to->pack_length());
|
||||
// to->ptr==from->ptr may happen if one does 'UPDATE ... SET x=x'
|
||||
memmove(to->ptr, from->ptr, to->pack_length());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user