mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
Fix false Valgrind warning.
On some compiler/platform combination, an assignment of form *p= *p would map to a memcpy() call, and Valgrind flags this as an overlapped memcpy() error. Fix by prefixing *p= *q with if(p!=q) when building for Valgrind (HAVE_purify). sql/sql_select.cc: Fix false valgrind warning.
This commit is contained in:
parent
2b39a66d80
commit
e3ddf9259a
1 changed files with 5 additions and 1 deletions
|
@ -3520,7 +3520,11 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
|
|||
continue;
|
||||
}
|
||||
|
||||
*save_pos= *use;
|
||||
#ifdef HAVE_purify
|
||||
/* Valgrind complains about overlapped memcpy when save_pos==use. */
|
||||
if (save_pos != use)
|
||||
#endif
|
||||
*save_pos= *use;
|
||||
prev=use;
|
||||
found_eq_constant= !use->used_tables;
|
||||
/* Save ptr to first use */
|
||||
|
|
Loading…
Add table
Reference in a new issue