Commit cb9e8bca authored by knielsen@ymer.(none)'s avatar knielsen@ymer.(none)

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).
parent 771c9795
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment