MDEV-4570 [PATCH] Sys_query_cache_limit initialization depends on initialization in other source files
This commit is contained in:
parent
097e65625a
commit
18cb29d432
@ -488,6 +488,7 @@ ulong slave_max_allowed_packet= 0;
|
|||||||
ulonglong binlog_stmt_cache_size=0;
|
ulonglong binlog_stmt_cache_size=0;
|
||||||
ulonglong max_binlog_stmt_cache_size=0;
|
ulonglong max_binlog_stmt_cache_size=0;
|
||||||
ulonglong query_cache_size=0;
|
ulonglong query_cache_size=0;
|
||||||
|
ulong query_cache_limit=0;
|
||||||
ulong refresh_version; /* Increments on each reload */
|
ulong refresh_version; /* Increments on each reload */
|
||||||
ulong executed_events=0;
|
ulong executed_events=0;
|
||||||
query_id_t global_query_id;
|
query_id_t global_query_id;
|
||||||
@ -4466,6 +4467,7 @@ static int init_server_components()
|
|||||||
query_cache_set_min_res_unit(query_cache_min_res_unit);
|
query_cache_set_min_res_unit(query_cache_min_res_unit);
|
||||||
query_cache_init();
|
query_cache_init();
|
||||||
query_cache_resize(query_cache_size);
|
query_cache_resize(query_cache_size);
|
||||||
|
query_cache_result_size_limit(query_cache_limit);
|
||||||
my_rnd_init(&sql_rand,(ulong) server_start_time,(ulong) server_start_time/2);
|
my_rnd_init(&sql_rand,(ulong) server_start_time,(ulong) server_start_time/2);
|
||||||
setup_fpu();
|
setup_fpu();
|
||||||
init_thr_lock();
|
init_thr_lock();
|
||||||
|
@ -156,6 +156,7 @@ extern ulong delayed_insert_threads, delayed_insert_writes;
|
|||||||
extern ulong delayed_rows_in_use,delayed_insert_errors;
|
extern ulong delayed_rows_in_use,delayed_insert_errors;
|
||||||
extern ulong slave_open_temp_tables;
|
extern ulong slave_open_temp_tables;
|
||||||
extern ulonglong query_cache_size;
|
extern ulonglong query_cache_size;
|
||||||
|
extern ulong query_cache_limit;
|
||||||
extern ulong query_cache_min_res_unit;
|
extern ulong query_cache_min_res_unit;
|
||||||
extern ulong slow_launch_threads, slow_launch_time;
|
extern ulong slow_launch_threads, slow_launch_time;
|
||||||
extern ulong table_cache_size, table_def_size;
|
extern ulong table_cache_size, table_def_size;
|
||||||
|
@ -2245,6 +2245,11 @@ static bool fix_query_cache_size(sys_var *self, THD *thd, enum_var_type type)
|
|||||||
query_cache_size= new_cache_size;
|
query_cache_size= new_cache_size;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
static bool fix_query_cache_limit(sys_var *self, THD *thd, enum_var_type type)
|
||||||
|
{
|
||||||
|
query_cache.result_size_limit(query_cache_limit);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
static Sys_var_ulonglong Sys_query_cache_size(
|
static Sys_var_ulonglong Sys_query_cache_size(
|
||||||
"query_cache_size",
|
"query_cache_size",
|
||||||
"The memory allocated to store results from old queries",
|
"The memory allocated to store results from old queries",
|
||||||
@ -2256,8 +2261,10 @@ static Sys_var_ulonglong Sys_query_cache_size(
|
|||||||
static Sys_var_ulong Sys_query_cache_limit(
|
static Sys_var_ulong Sys_query_cache_limit(
|
||||||
"query_cache_limit",
|
"query_cache_limit",
|
||||||
"Don't cache results that are bigger than this",
|
"Don't cache results that are bigger than this",
|
||||||
GLOBAL_VAR(query_cache.query_cache_limit), CMD_LINE(REQUIRED_ARG),
|
GLOBAL_VAR(query_cache_limit), CMD_LINE(REQUIRED_ARG),
|
||||||
VALID_RANGE(0, UINT_MAX), DEFAULT(1024*1024), BLOCK_SIZE(1));
|
VALID_RANGE(0, UINT_MAX), DEFAULT(1024*1024), BLOCK_SIZE(1),
|
||||||
|
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
|
||||||
|
ON_UPDATE(fix_query_cache_limit));
|
||||||
|
|
||||||
static bool fix_qcache_min_res_unit(sys_var *self, THD *thd, enum_var_type type)
|
static bool fix_qcache_min_res_unit(sys_var *self, THD *thd, enum_var_type type)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user