mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge
include/my_base.h: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged isam/test2.c: Auto merged myisam/mi_check.c: Auto merged myisam/mi_test2.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/r/func_group.result: Auto merged sql/ha_myisam.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item_cmpfunc.h: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/set_var.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_test.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/mysqld.cc: SCCS merged sql/set_var.cc: SCCS merged
This commit is contained in:
@ -30,6 +30,11 @@ class set_var;
|
||||
typedef struct system_variables SV;
|
||||
extern TYPELIB bool_typelib, delay_key_write_typelib, sql_mode_typelib;
|
||||
|
||||
extern ulonglong dflt_key_buff_size;
|
||||
extern uint dflt_key_cache_block_size;
|
||||
extern uint dflt_key_cache_division_limit;
|
||||
extern uint dflt_key_cache_age_threshold;
|
||||
|
||||
enum enum_var_type
|
||||
{
|
||||
OPT_DEFAULT, OPT_SESSION, OPT_GLOBAL
|
||||
@ -546,15 +551,71 @@ public:
|
||||
byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
|
||||
};
|
||||
|
||||
class sys_var_key_buffer_size :public sys_var
|
||||
class sys_var_key_cache_param :public sys_var
|
||||
{
|
||||
protected:
|
||||
uint offset;
|
||||
public:
|
||||
sys_var_key_cache_param(const char *name_arg)
|
||||
:sys_var(name_arg)
|
||||
{
|
||||
offset= 0;
|
||||
}
|
||||
byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
|
||||
};
|
||||
|
||||
class sys_var_key_buffer_size :public sys_var_key_cache_param
|
||||
{
|
||||
public:
|
||||
sys_var_key_buffer_size(const char *name_arg)
|
||||
:sys_var(name_arg)
|
||||
{}
|
||||
:sys_var_key_cache_param(name_arg)
|
||||
{
|
||||
offset= offsetof(KEY_CACHE_VAR, buff_size);
|
||||
}
|
||||
bool update(THD *thd, set_var *var);
|
||||
SHOW_TYPE type() { return SHOW_LONGLONG; }
|
||||
byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
|
||||
bool check_default(enum_var_type type) { return 1; }
|
||||
bool is_struct() { return 1; }
|
||||
};
|
||||
|
||||
class sys_var_key_cache_block_size :public sys_var_key_cache_param
|
||||
{
|
||||
public:
|
||||
sys_var_key_cache_block_size(const char *name_arg)
|
||||
:sys_var_key_cache_param(name_arg)
|
||||
{
|
||||
offset= offsetof(KEY_CACHE_VAR, block_size);
|
||||
}
|
||||
bool update(THD *thd, set_var *var);
|
||||
SHOW_TYPE type() { return SHOW_LONG; }
|
||||
bool check_default(enum_var_type type) { return 1; }
|
||||
bool is_struct() { return 1; }
|
||||
};
|
||||
|
||||
class sys_var_key_cache_division_limit :public sys_var_key_cache_param
|
||||
{
|
||||
public:
|
||||
sys_var_key_cache_division_limit(const char *name_arg)
|
||||
:sys_var_key_cache_param(name_arg)
|
||||
{
|
||||
offset= offsetof(KEY_CACHE_VAR, division_limit);
|
||||
}
|
||||
bool update(THD *thd, set_var *var);
|
||||
SHOW_TYPE type() { return SHOW_LONG; }
|
||||
bool check_default(enum_var_type type) { return 1; }
|
||||
bool is_struct() { return 1; }
|
||||
};
|
||||
|
||||
class sys_var_key_cache_age_threshold :public sys_var_key_cache_param
|
||||
{
|
||||
public:
|
||||
sys_var_key_cache_age_threshold(const char *name_arg)
|
||||
:sys_var_key_cache_param(name_arg)
|
||||
{
|
||||
offset= offsetof(KEY_CACHE_VAR, age_threshold);
|
||||
}
|
||||
bool update(THD *thd, set_var *var);
|
||||
SHOW_TYPE type() { return SHOW_LONG; }
|
||||
bool check_default(enum_var_type type) { return 1; }
|
||||
bool is_struct() { return 1; }
|
||||
};
|
||||
@ -785,5 +846,6 @@ gptr find_named(I_List<NAMED_LIST> *list, const char *name, uint length,
|
||||
void delete_elements(I_List<NAMED_LIST> *list, void (*free_element)(gptr));
|
||||
|
||||
/* key_cache functions */
|
||||
KEY_CACHE *get_or_create_key_cache(const char *name, uint length);
|
||||
KEY_CACHE_VAR *get_or_create_key_cache(const char *name, uint length);
|
||||
void free_key_cache(gptr key_cache);
|
||||
bool process_key_caches(int (* func) (KEY_CACHE_VAR *));
|
||||
|
Reference in New Issue
Block a user