mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug#30087 Set query_cache_size, if the value is too small, get a unclear warning
Reverting the previous patch
This commit is contained in:
@ -816,16 +816,6 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
|
||||
free_cache();
|
||||
query_cache_size= query_cache_size_arg;
|
||||
::query_cache_size= init_cache();
|
||||
|
||||
if (::query_cache_size != query_cache_size_arg)
|
||||
{
|
||||
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_WARN_QC_RESIZE, ER(ER_WARN_QC_RESIZE),
|
||||
query_cache_size_arg,
|
||||
get_minimal_size_limit(),
|
||||
::query_cache_size);
|
||||
}
|
||||
|
||||
STRUCT_UNLOCK(&structure_guard_mutex);
|
||||
DBUG_RETURN(::query_cache_size);
|
||||
}
|
||||
@ -1624,25 +1614,6 @@ void Query_cache::init()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Return the lowest possible query cache size.
|
||||
*/
|
||||
|
||||
ulong Query_cache::get_minimal_size_limit()
|
||||
{
|
||||
ulong approx_additional_data_size= (sizeof(Query_cache) +
|
||||
sizeof(gptr)*(def_query_hash_size+
|
||||
def_table_hash_size));
|
||||
|
||||
ulong data_size= (min_allocation_unit << QUERY_CACHE_MEM_BIN_STEP_PWR2 <<
|
||||
QUERY_CACHE_MEM_BIN_FIRST_STEP_PWR2) +
|
||||
ALIGN_SIZE(1) - 1 +
|
||||
(1 << QUERY_CACHE_MEM_BIN_STEP_PWR2) - 1 +
|
||||
(1 << QUERY_CACHE_MEM_BIN_FIRST_STEP_PWR2) - 1;
|
||||
|
||||
return(data_size + approx_additional_data_size);
|
||||
}
|
||||
|
||||
ulong Query_cache::init_cache()
|
||||
{
|
||||
uint mem_bin_count, num, step;
|
||||
|
Reference in New Issue
Block a user