Commit 6976bb94 authored by Nayuta Yanagisawa's avatar Nayuta Yanagisawa Committed by Sergei Golubchik

MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression

Add missing DBUG_RETURN to my_malloc.
parent 8d714db6
......@@ -2207,6 +2207,12 @@ Variable_name Value
Qcache_queries_in_cache 0
DROP FUNCTION foo;
drop table t1;
#
# MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
#
set global Query_cache_size=18446744073709547520;
Warnings:
Warning 1282 Query cache failed to set size 18446744073709547520; new query cache size is 0
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
......@@ -1800,6 +1800,11 @@ show status like "Qcache_queries_in_cache";
DROP FUNCTION foo;
drop table t1;
--echo #
--echo # MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
--echo #
set global Query_cache_size=18446744073709547520;
--echo restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
......@@ -79,7 +79,7 @@ void *my_malloc(PSI_memory_key key, size_t size, myf my_flags)
if (!size)
size=1;
if (size > SIZE_T_MAX - 1024L*1024L*16L) /* Wrong call */
return 0;
DBUG_RETURN(0);
/* We have to align size as we store MY_THREAD_SPECIFIC flag in the LSB */
size= ALIGN_SIZE(size);
......
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