diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log.cc | 3 | ||||
-rw-r--r-- | sql/set_var.cc | 8 | ||||
-rw-r--r-- | sql/set_var.h | 20 |
3 files changed, 6 insertions, 25 deletions
diff --git a/sql/log.cc b/sql/log.cc index ed4d6c8521e..5e15b2b170c 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1307,7 +1307,7 @@ bool MYSQL_LOG::write(Log_event* event_info) if (thd) { -#if MYSQL_VERSION_ID < 50000 + /* NOTE: CHARSET AND TZ REPL WILL BE REWRITTEN SHORTLY */ /* To make replication of charsets working in 4.1 we are writing values of charset related variables before every statement in the binlog, @@ -1353,7 +1353,6 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u", if (e.write(file)) goto err; } -#endif if (thd->last_insert_id_used) { diff --git a/sql/set_var.cc b/sql/set_var.cc index 07ab6620e4b..442a3ff0df2 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1913,7 +1913,7 @@ void sys_var_character_set_server::set_default(THD *thd, enum_var_type type) } } -#if defined(HAVE_REPLICATION) && (MYSQL_VERSION_ID < 50000) +#if defined(HAVE_REPLICATION) bool sys_var_character_set_server::check(THD *thd, set_var *var) { if ((var->type == OPT_GLOBAL) && @@ -2020,7 +2020,7 @@ void sys_var_collation_database::set_default(THD *thd, enum_var_type type) } } -#if defined(HAVE_REPLICATION) && (MYSQL_VERSION_ID < 50000) +#if defined(HAVE_REPLICATION) bool sys_var_collation_server::check(THD *thd, set_var *var) { if ((var->type == OPT_GLOBAL) && @@ -2372,7 +2372,7 @@ bool sys_var_thd_time_zone::check(THD *thd, set_var *var) String str(buff, sizeof(buff), &my_charset_latin1); String *res= var->value->val_str(&str); -#if defined(HAVE_REPLICATION) && (MYSQL_VERSION_ID < 50000) +#if defined(HAVE_REPLICATION) if ((var->type == OPT_GLOBAL) && (mysql_bin_log.is_open() || active_mi->slave_running || active_mi->rli.slave_running)) @@ -2736,7 +2736,6 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list) bool not_all_support_one_shot(List<set_var_base> *var_list) { -#if MYSQL_VERSION_ID < 50000 List_iterator_fast<set_var_base> it(*var_list); set_var_base *var; while ((var= it++)) @@ -2744,7 +2743,6 @@ bool not_all_support_one_shot(List<set_var_base> *var_list) if (var->no_support_one_shot()) return 1; } -#endif return 0; } diff --git a/sql/set_var.h b/sql/set_var.h index a51e44285d6..1374492526e 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -49,20 +49,14 @@ public: const char *name; sys_after_update_func after_update; -#if MYSQL_VERSION_ID < 50000 bool no_support_one_shot; -#endif sys_var(const char *name_arg) :name(name_arg), after_update(0) -#if MYSQL_VERSION_ID < 50000 , no_support_one_shot(1) -#endif {} sys_var(const char *name_arg,sys_after_update_func func) :name(name_arg), after_update(func) -#if MYSQL_VERSION_ID < 50000 , no_support_one_shot(1) -#endif {} virtual ~sys_var() {} virtual bool check(THD *thd, set_var *var); @@ -507,9 +501,7 @@ class sys_var_collation :public sys_var_thd public: sys_var_collation(const char *name_arg) :sys_var_thd(name_arg) { -#if MYSQL_VERSION_ID < 50000 no_support_one_shot= 0; -#endif } bool check(THD *thd, set_var *var); SHOW_TYPE type() { return SHOW_CHAR; } @@ -529,13 +521,11 @@ public: sys_var_thd(name_arg) { nullable= 0; -#if MYSQL_VERSION_ID < 50000 /* In fact only almost all variables derived from sys_var_character_set support ONE_SHOT; character_set_results doesn't. But that's good enough. */ no_support_one_shot= 0; -#endif } bool check(THD *thd, set_var *var); SHOW_TYPE type() { return SHOW_CHAR; } @@ -574,7 +564,7 @@ class sys_var_character_set_server :public sys_var_character_set public: sys_var_character_set_server(const char *name_arg) : sys_var_character_set(name_arg) {} -#if defined(HAVE_REPLICATION) && (MYSQL_VERSION_ID < 50000) +#if defined(HAVE_REPLICATION) bool check(THD *thd, set_var *var); #endif void set_default(THD *thd, enum_var_type type); @@ -612,7 +602,7 @@ class sys_var_collation_server :public sys_var_collation { public: sys_var_collation_server(const char *name_arg) :sys_var_collation(name_arg) {} -#if defined(HAVE_REPLICATION) && (MYSQL_VERSION_ID < 50000) +#if defined(HAVE_REPLICATION) bool check(THD *thd, set_var *var); #endif bool update(THD *thd, set_var *var); @@ -722,9 +712,7 @@ public: sys_var_thd_time_zone(const char *name_arg): sys_var_thd(name_arg) { -#if MYSQL_VERSION_ID < 50000 no_support_one_shot= 0; -#endif } bool check(THD *thd, set_var *var); SHOW_TYPE type() { return SHOW_CHAR; } @@ -752,9 +740,7 @@ public: virtual int update(THD *thd)=0; /* To set the value */ /* light check for PS */ virtual int light_check(THD *thd) { return check(thd); } -#if MYSQL_VERSION_ID < 50000 virtual bool no_support_one_shot() { return 1; } -#endif }; @@ -797,9 +783,7 @@ public: int check(THD *thd); int update(THD *thd); int light_check(THD *thd); -#if MYSQL_VERSION_ID < 50000 bool no_support_one_shot() { return var->no_support_one_shot; } -#endif }; |