diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-11-11 22:12:12 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-11-11 22:42:41 +0100 |
commit | 60df218a587d5fc1446665552807db02a2db489e (patch) | |
tree | bad65d76f2b414f0224901108710513b2bb9cbd0 | |
parent | 94ef277b5b98afb25400fdb1b3b4917ef16172da (diff) | |
download | mariadb-git-bb-10.4-wlad-compiler-bug.tar.gz |
MDEV-27030 vcol.vcol_keys_myisam fails on Windows x64, with Visual Studio 2022bb-10.4-wlad-compiler-bug
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
-rw-r--r-- | storage/myisam/mi_delete.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/myisam/mi_delete.c b/storage/myisam/mi_delete.c index 2c829fa9860..62409a15a46 100644 --- a/storage/myisam/mi_delete.c +++ b/storage/myisam/mi_delete.c @@ -767,6 +767,10 @@ err: 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, uchar *keypos, /* Where key starts */ 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)); DBUG_RETURN((uint) s_length); } /* remove_key */ + +#if defined(_MSC_VER) && defined(_M_X64) && _MSC_VER >= 1930 +#pragma optimize("",on) +#endif |