Commit 370f79e3 authored by Michael Widenius's avatar Michael Widenius

Fixed strict alias problem by replacing = with memcpy()

parent 059aff15
......@@ -2334,7 +2334,11 @@ public:
{
if (!stmt_arena->is_conventional())
check_and_register_item_tree_change(place, new_value, mem_root);
*place= *new_value;
/*
We have to use memcpy instead of *place= *new_value merge to
avoid problems with strict aliasing.
*/
memcpy((char*) place, new_value, sizeof(*new_value));
}
void nocheck_register_item_tree_change(Item **place, Item *old_value,
MEM_ROOT *runtime_memroot);
......
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