summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-07-15 23:34:41 +0200
committerunknown <guilhem@mysql.com>2004-07-15 23:34:41 +0200
commit898ceb0f968166a83ef04b1db3f88f2e817f8a53 (patch)
treec1ac1b5a0edb3b81c331aae90572d39f9ccfcde2 /sql/set_var.h
parenta96bb92f4a6542409e801c1410d58fa36eb55cad (diff)
downloadmariadb-git-898ceb0f968166a83ef04b1db3f88f2e817f8a53.tar.gz
after merge fixes (making rpl_charset and rpl_timezone pass).
Replication of charsets and timezones should shortly be changed to not need ONE_SHOT (but 5.0 should still be able to read it, to be able to replicate 4.1 masters). mysql-test/r/rpl_charset.result: result update after the merge (only binlog positions differ from 4.1) mysql-test/r/rpl_timezone.result: result update after the merge (only binlog positions differ from 4.1) sql/log.cc: use ONE_SHOT to save charset and TZ info in the binlog (until I rewrite this soon) sql/set_var.cc: Even if in the future, 5.0 will not use ONE_SHOT in ITS binlog, it must still be able to interpret it, to make 4.1->5.0 replication possible sql/set_var.h: Even if in the future, 5.0 will not use ONE_SHOT in ITS binlog, it must still be able to interpret it, to make 4.1->5.0 replication possible
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h20
1 files changed, 2 insertions, 18 deletions
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
};