diff options
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 55 |
1 files changed, 48 insertions, 7 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index 0202a15836d..a83de6425ae 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -645,6 +645,7 @@ public: uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); }; +#ifndef DBUG_OFF class sys_var_thd_dbug :public sys_var_thd { public: @@ -658,8 +659,23 @@ public: void set_default(THD *thd, enum_var_type type) { DBUG_POP(); } uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *b); }; +#endif /* DBUG_OFF */ - +#if defined(ENABLED_DEBUG_SYNC) +/* Debug Sync Facility. Implemented in debug_sync.cc. */ +class sys_var_debug_sync :public sys_var_thd +{ +public: + sys_var_debug_sync(sys_var_chain *chain, const char *name_arg) + :sys_var_thd(name_arg) + { chain_sys_var(chain); } + bool check(THD *thd, set_var *var); + bool update(THD *thd, set_var *var); + SHOW_TYPE show_type() { return SHOW_CHAR; } + bool check_update_type(Item_result type) { return type != STRING_RESULT; } + uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); +}; +#endif /* defined(ENABLED_DEBUG_SYNC) */ /* some variables that require special handling */ @@ -1224,11 +1240,12 @@ public: }; -class sys_var_thd_lc_time_names :public sys_var_thd + +class sys_var_thd_lc: public sys_var_thd { public: - sys_var_thd_lc_time_names(sys_var_chain *chain, const char *name_arg, - Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + sys_var_thd_lc(sys_var_chain *chain, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) : sys_var_thd(name_arg, NULL, binlog_status_arg) { #if MYSQL_VERSION_ID < 50000 @@ -1243,11 +1260,35 @@ public: return ((type != STRING_RESULT) && (type != INT_RESULT)); } bool check_default(enum_var_type type) { return 0; } +}; + + +class sys_var_thd_lc_time_names :public sys_var_thd_lc +{ +public: + sys_var_thd_lc_time_names(sys_var_chain *chain_arg, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + : sys_var_thd_lc(chain_arg, name_arg, binlog_status_arg) + {} bool update(THD *thd, set_var *var); uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); - virtual void set_default(THD *thd, enum_var_type type); + void set_default(THD *thd, enum_var_type type); +}; + + +class sys_var_thd_lc_messages :public sys_var_thd_lc +{ +public: + sys_var_thd_lc_messages(sys_var_chain *chain_arg, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + : sys_var_thd_lc(chain_arg, name_arg, binlog_status_arg) + {} + bool update(THD *thd, set_var *var); + uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); + void set_default(THD *thd, enum_var_type type); }; + #ifdef HAVE_EVENT_SCHEDULER class sys_var_event_scheduler :public sys_var_long_ptr { @@ -1330,8 +1371,8 @@ public: { Item_field *item= (Item_field*) value_arg; if (!(value=new Item_string(item->field_name, - (uint) strlen(item->field_name), - item->collation.collation))) + (uint) strlen(item->field_name), + system_charset_info))) value=value_arg; /* Give error message later */ } else |