Commit 0b2ef577 authored by unknown's avatar unknown

groundbreaking on fail-safe replication - added a token feature to have an

excuse to have a test case. Mental trick to get things moving faster...


mysql-test/mysql-test-run.sh:
  recovery rank
sql/mysqld.cc:
  recovery rank
parent c0c55b43
......@@ -591,7 +591,7 @@ start_master()
if [ -z "$DO_BENCH" ]
then
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin \
--server-id=1 \
--server-id=1 --rpl-recovery-rank=1 \
--basedir=$MY_BASEDIR \
--port=$MASTER_MYPORT \
--exit-info=256 \
......@@ -608,7 +608,7 @@ start_master()
$EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
else
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin \
--server-id=1 \
--server-id=1 --rpl-recovery-rank=1 \
--basedir=$MY_BASEDIR \
--port=$MASTER_MYPORT \
--datadir=$MASTER_MYDDIR \
......@@ -663,7 +663,7 @@ start_slave()
--master-host=127.0.0.1 \
--master-password= \
--master-port=$MASTER_MYPORT \
--server-id=2"
--server-id=2 --rpl-recovery-rank=2"
else
master_info=$SLAVE_MASTER_INFO
fi
......
slave stop;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 1
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 2
source include/master-slave.inc;
connection master;
show variables like 'rpl_recovery_rank';
connection slave;
show variables like 'rpl_recovery_rank';
......@@ -330,6 +330,8 @@ const char *sql_mode_str="OFF";
const char *default_tx_isolation_name;
enum_tx_isolation default_tx_isolation=ISO_READ_COMMITTED;
uint rpl_recovery_rank=0;
#ifdef HAVE_GEMINI_DB
const char *gemini_recovery_options_str="FULL";
#endif
......@@ -2606,7 +2608,8 @@ enum options {
OPT_DO_PSTACK, OPT_REPORT_HOST,
OPT_REPORT_USER, OPT_REPORT_PASSWORD, OPT_REPORT_PORT,
OPT_SHOW_SLAVE_AUTH_INFO, OPT_OLD_RPL_COMPAT,
OPT_SLAVE_LOAD_TMPDIR, OPT_NO_MIX_TYPE
OPT_SLAVE_LOAD_TMPDIR, OPT_NO_MIX_TYPE,
OPT_RPL_RECOVERY_RANK
};
static struct option long_options[] = {
......@@ -2731,6 +2734,7 @@ static struct option long_options[] = {
{"report-user", required_argument, 0, (int) OPT_REPORT_USER},
{"report-password", required_argument, 0, (int) OPT_REPORT_PASSWORD},
{"report-port", required_argument, 0, (int) OPT_REPORT_PORT},
{"rpl-recovery-rank", required_argument, 0, (int) OPT_RPL_RECOVERY_RANK},
{"safe-mode", no_argument, 0, (int) OPT_SAFE},
{"safe-show-database", no_argument, 0, (int) OPT_SAFE_SHOW_DB},
{"safe-user-create", no_argument, 0, (int) OPT_SAFE_USER_CREATE},
......@@ -3030,6 +3034,7 @@ struct show_var_st init_vars[]= {
{"protocol_version", (char*) &protocol_version, SHOW_INT},
{"record_buffer", (char*) &my_default_record_cache_size,SHOW_LONG},
{"record_rnd_buffer", (char*) &record_rnd_cache_size, SHOW_LONG},
{"rpl_recovery_rank", (char*) &rpl_recovery_rank, SHOW_LONG},
{"query_buffer_size", (char*) &query_buff_size, SHOW_LONG},
{"safe_show_database", (char*) &opt_safe_show_db, SHOW_BOOL},
{"server_id", (char*) &server_id, SHOW_LONG},
......@@ -3450,6 +3455,9 @@ static void get_options(int argc,char **argv)
safemalloc_mem_limit = atoi(optarg);
#endif
break;
case OPT_RPL_RECOVERY_RANK:
rpl_recovery_rank=atoi(optarg);
break;
case OPT_SLAVE_LOAD_TMPDIR:
slave_load_tmpdir = my_strdup(optarg, MYF(MY_FAE));
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment