MDEV-30572: my_large_malloc will only retry on ENOMEM

Correct error in to only say "continuing to smaller size" if it really
is.
This commit is contained in:
Daniel Black 2023-02-06 18:00:15 +11:00
parent acd23da4c2
commit 2b494ccc15

View File

@ -354,7 +354,7 @@ uchar *my_large_malloc(size_t *size, myf my_flags)
ptr= NULL;
if (my_flags & MY_WME)
{
if (large_page_size)
if (large_page_size && errno == ENOMEM)
{
my_printf_error(EE_OUTOFMEMORY,
"Couldn't allocate %zu bytes (Large/HugeTLB memory "