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

MDEV-27030 vcol.vcol_keys_myisam fails on Windows x64, with Visual Studio 2022

Upon investigation, decided this to be a compiler bug
(happens with new compiler, on code that did not change for the last 15 years)

Fixed by de-optimizing single function remove_key(), using MSVC pragma
This commit is contained in:
Vladislav Vaintroub
2021-11-11 22:12:12 +01:00
parent 9c18b96603
commit 5b21a8fafc

View File

@@ -767,6 +767,10 @@ err:
returns how many chars was removed or 0 on error returns how many chars was removed or 0 on error
*/ */
#if defined(_MSC_VER) && defined(_M_X64) && _MSC_VER >= 1930
#pragma optimize("g", off)
#endif
static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag, static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag,
uchar *keypos, /* Where key starts */ uchar *keypos, /* Where key starts */
uchar *lastkey, /* key to be removed */ uchar *lastkey, /* key to be removed */
@@ -891,3 +895,7 @@ static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag,
(uint) (page_end-start-s_length)); (uint) (page_end-start-s_length));
DBUG_RETURN((uint) s_length); DBUG_RETURN((uint) s_length);
} /* remove_key */ } /* remove_key */
#if defined(_MSC_VER) && defined(_M_X64) && _MSC_VER >= 1930
#pragma optimize("",on)
#endif