mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Fix for Bug#56138 "valgrind errors about overlapping memory when double-assigning same variable",
and related small fixes.
This commit is contained in:
parent
871930e708
commit
b5586c67ec
5 changed files with 19 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue