diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-10-10 15:36:35 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-10-10 15:36:35 -0600 |
commit | 6b648e4b1344391659b7be10c45c7fb71cb8e17d (patch) | |
tree | 2143fd43b5532ceec7d6fb7e900d5119ca3a61ec /sql | |
parent | b9578dba1f8521a22cdf73d6c3fa20ef4bc11de0 (diff) | |
download | mariadb-git-6b648e4b1344391659b7be10c45c7fb71cb8e17d.tar.gz |
got the last changeset to compile/run
mysqltest can run without connecting to the manager for tests that do not
require manager operations
client/mysqltest.c:
make mysqltest work without having to connect to the manager
mysql-test/mysql-test-run.sh:
init-rpl-role option to servers
pass manager-host to mysqltest
mysql-test/r/rpl_failsafe.result:
updated result
mysql-test/t/rpl_failsafe.test:
check for Rpl_status
sql/mysqld.cc:
fixed bad merge
sql/repl_failsafe.cc:
fixed bug
sql/repl_failsafe.h:
fixed compile error
sql/sql_show.cc:
fixed compile error
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 5 | ||||
-rw-r--r-- | sql/repl_failsafe.cc | 6 | ||||
-rw-r--r-- | sql/repl_failsafe.h | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 1 |
4 files changed, 8 insertions, 6 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 870c241af13..ca9c0bae682 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2598,7 +2598,7 @@ enum options { 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_RPL_RECOVERY_RANK + OPT_RPL_RECOVERY_RANK,OPT_INIT_RPL_ROLE }; static struct option long_options[] = { @@ -2634,6 +2634,7 @@ static struct option long_options[] = { {"enable-pstack", no_argument, 0, (int) OPT_DO_PSTACK}, {"exit-info", optional_argument, 0, 'T'}, {"flush", no_argument, 0, (int) OPT_FLUSH}, + {"init-rpl-role", required_argument, 0, (int) OPT_INIT_RPL_ROLE}, /* We must always support this option to make scripts like mysqltest easier to do */ {"innodb_data_file_path", required_argument, 0, @@ -3502,7 +3503,7 @@ static void get_options(int argc,char **argv) fprintf(stderr, "Unknown replication role: %s\n", optarg); exit(1); } - rpl_status = (rpl_role == 1) ? RPL_AUTH_MASTER : RPL_IDLE_SLAVE; + rpl_status = (role == 1) ? RPL_AUTH_MASTER : RPL_IDLE_SLAVE; break; } case (int)OPT_REPLICATE_IGNORE_DB: diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 541c53ea24a..bdd63bd9a10 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -23,9 +23,9 @@ RPL_STATUS rpl_status=RPL_NULL; pthread_mutex_t LOCK_rpl_status; pthread_cond_t COND_rpl_status; -const char *rpl_role_type[] = {"","MASTER","SLAVE",NullS}; -TYPELIB rpl_role_typelib = {array_elements(rpl_role_type)-4,"", - rpl_role_type+1}; +const char *rpl_role_type[] = {"MASTER","SLAVE",NullS}; +TYPELIB rpl_role_typelib = {array_elements(rpl_role_type)-1,"", + rpl_role_type}; const char* rpl_status_type[] = {"AUTH_MASTER","ACTIVE_SLAVE","IDLE_SLAVE", "LOST_SOLDIER","TROOP_SOLDIER", diff --git a/sql/repl_failsafe.h b/sql/repl_failsafe.h index 1f62da7b05e..95069404acb 100644 --- a/sql/repl_failsafe.h +++ b/sql/repl_failsafe.h @@ -9,5 +9,5 @@ extern RPL_STATUS rpl_status; extern pthread_mutex_t LOCK_rpl_status; extern pthread_cond_t COND_rpl_status; extern TYPELIB rpl_role_typelib, rpl_status_typelib; -extern char* rpl_role_type[], *rpl_status_type; +extern const char* rpl_role_type[], *rpl_status_type[]; #endif diff --git a/sql/sql_show.cc b/sql/sql_show.cc index dba6b55443c..19c3d89caaf 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -20,6 +20,7 @@ #include "mysql_priv.h" #include "sql_select.h" // For select_describe #include "sql_acl.h" +#include "repl_failsafe.h" #include <my_dir.h> #ifdef HAVE_BERKELEY_DB |