1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fix GCC 9.3.0 -Wstrict-aliasing

copy_keys_from_share(): Use reinterpret_cast instead of
manipulating a reference to a type-punned pointer.

This cleans up after the cleanup
commit 0515577d12.
This commit is contained in:
Marko Mäkelä
2020-04-01 11:33:58 +03:00
parent abaeeffbf9
commit 51a9dd6793

View File

@@ -3745,7 +3745,8 @@ bool copy_keys_from_share(TABLE *outparam, MEM_ROOT *root)
key_info++)
{
key_info->table= outparam;
(uchar*&)(key_info->key_part)+= adjust_ptrs;
key_info->key_part= reinterpret_cast<KEY_PART_INFO*>
(reinterpret_cast<char*>(key_info->key_part) + adjust_ptrs);
if (key_info->algorithm == HA_KEY_ALG_LONG_HASH)
key_info->flags&= ~HA_NOSAME;
}