summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.homeip.net>2005-02-04 15:13:45 +0100
committerunknown <msvensson@neptunus.homeip.net>2005-02-04 15:13:45 +0100
commitc1d06b3cfaa64036de0de4907bc74a7faa4074f1 (patch)
treec65a75bef2bc6a67df60074431f798396b06c2b3 /sql/set_var.cc
parent9e92b63a0bc55356e42c169827b5cd2d631a92f9 (diff)
parent285038bd1c2d33ea6dae487bb1f39a97b6cb9672 (diff)
downloadmariadb-git-c1d06b3cfaa64036de0de4907bc74a7faa4074f1.tar.gz
Merge neptunus.homeip.net:/home/msvensson/mysql/mysql-5.0
into neptunus.homeip.net:/home/msvensson/mysql/mysql-5.0-cluster-extra BitKeeper/etc/logging_ok: auto-union sql/ha_innodb.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.h: Auto merged
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc24
1 files changed, 22 insertions, 2 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 18b713a1668..04bb2c5e78f 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -358,6 +358,14 @@ sys_var_thd_storage_engine sys_storage_engine("storage_engine",
&SV::table_type);
#ifdef HAVE_REPLICATION
sys_var_sync_binlog_period sys_sync_binlog_period("sync_binlog", &sync_binlog_period);
+sys_var_thd_ulong sys_sync_replication("sync_replication",
+ &SV::sync_replication);
+sys_var_thd_ulong sys_sync_replication_slave_id(
+ "sync_replication_slave_id",
+ &SV::sync_replication_slave_id);
+sys_var_thd_ulong sys_sync_replication_timeout(
+ "sync_replication_timeout",
+ &SV::sync_replication_timeout);
#endif
sys_var_bool_ptr sys_sync_frm("sync_frm", &opt_sync_frm);
sys_var_long_ptr sys_table_cache_size("table_cache",
@@ -648,6 +656,9 @@ sys_var *sys_variables[]=
&sys_storage_engine,
#ifdef HAVE_REPLICATION
&sys_sync_binlog_period,
+ &sys_sync_replication,
+ &sys_sync_replication_slave_id,
+ &sys_sync_replication_timeout,
#endif
&sys_sync_frm,
&sys_table_cache_size,
@@ -918,6 +929,9 @@ struct show_var_st init_vars[]= {
{sys_storage_engine.name, (char*) &sys_storage_engine, SHOW_SYS},
#ifdef HAVE_REPLICATION
{sys_sync_binlog_period.name,(char*) &sys_sync_binlog_period, SHOW_SYS},
+ {sys_sync_replication.name, (char*) &sys_sync_replication, SHOW_SYS},
+ {sys_sync_replication_slave_id.name, (char*) &sys_sync_replication_slave_id,SHOW_SYS},
+ {sys_sync_replication_timeout.name, (char*) &sys_sync_replication_timeout,SHOW_SYS},
#endif
{sys_sync_frm.name, (char*) &sys_sync_frm, SHOW_SYS},
#ifdef HAVE_TZNAME
@@ -2050,9 +2064,15 @@ void sys_var_character_set_server::set_default(THD *thd, enum_var_type type)
}
}
-#if defined(HAVE_REPLICATION)
+#if defined(HAVE_REPLICATION) && (MYSQL_VERSION_ID < 50003)
bool sys_var_character_set_server::check(THD *thd, set_var *var)
{
+ /*
+ To be perfect we should fail even if we are a 5.0.3 slave, a 4.1 master,
+ and user wants to change our global character set variables. Because
+ replicating a 4.1 assumes those are not changed. But that's not easy to
+ do.
+ */
if ((var->type == OPT_GLOBAL) &&
(mysql_bin_log.is_open() ||
active_mi->slave_running || active_mi->rli.slave_running))
@@ -2157,7 +2177,7 @@ void sys_var_collation_database::set_default(THD *thd, enum_var_type type)
}
}
-#if defined(HAVE_REPLICATION)
+#if defined(HAVE_REPLICATION) && (MYSQL_VERSION_ID < 50003)
bool sys_var_collation_server::check(THD *thd, set_var *var)
{
if ((var->type == OPT_GLOBAL) &&