Below is the list of changes that have just been committed into a
4.0 repository of sasha. When sasha does a push, they will be propogated to
the main repository and within 24 hours after the push to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet@stripped, 2001-10-10 15:36:35-06:00, sasha@stripped
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
1.64 01/10/10 15:36:34 sasha@stripped +8 -3
make mysqltest work without having to connect to the manager
mysql-test/mysql-test-run.sh
1.111 01/10/10 15:36:34 sasha@stripped +5 -4
init-rpl-role option to servers
pass manager-host to mysqltest
mysql-test/r/rpl_failsafe.result
1.3 01/10/10 15:36:34 sasha@stripped +12 -0
updated result
mysql-test/t/rpl_failsafe.test
1.3 01/10/10 15:36:34 sasha@stripped +4 -0
check for Rpl_status
sql/mysqld.cc
1.235 01/10/10 15:36:34 sasha@stripped +3 -2
fixed bad merge
sql/repl_failsafe.cc
1.2 01/10/10 15:36:34 sasha@stripped +3 -3
fixed bug
sql/repl_failsafe.h
1.2 01/10/10 15:36:34 sasha@stripped +1 -1
fixed compile error
sql/sql_show.cc
1.71 01/10/10 15:36:34 sasha@stripped +1 -0
fixed compile error
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: sasha
# Host: mysql.sashanet.com
# Root: /home/sasha/src/bk/mysql-4.0
--- 1.110/mysql-test/mysql-test-run.sh Tue Oct 9 16:43:04 2001
+++ 1.111/mysql-test/mysql-test-run.sh Wed Oct 10 15:36:34 2001
@@ -538,7 +538,8 @@
$MYSQL_MANAGER --log=$MYSQL_MANAGER_LOG --port=$MYSQL_MANAGER_PORT \
--password-file=$MYSQL_MANAGER_PW_FILE
abort_if_failed "Could not start MySQL manager"
- mysqltest_manager_args="--manager-user=$MYSQL_MANAGER_USER \
+ mysqltest_manager_args="--manager-host=localhost \
+ --manager-user=$MYSQL_MANAGER_USER \
--manager-password=$MYSQL_MANAGER_PW \
--manager-port=$MYSQL_MANAGER_PORT \
--manager-wait-timeout=$START_WAIT_TIMEOUT"
@@ -600,7 +601,7 @@
then
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin \
--server-id=1 --rpl-recovery-rank=1 \
- --basedir=$MY_BASEDIR \
+ --basedir=$MY_BASEDIR --init-rpl-role=master \
--port=$MASTER_MYPORT \
--exit-info=256 \
--datadir=$MASTER_MYDDIR \
@@ -617,7 +618,7 @@
else
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin \
--server-id=1 --rpl-recovery-rank=1 \
- --basedir=$MY_BASEDIR \
+ --basedir=$MY_BASEDIR --init-rpl-role=master \
--port=$MASTER_MYPORT \
--datadir=$MASTER_MYDDIR \
--pid-file=$MASTER_MYPID \
@@ -712,7 +713,7 @@
--socket=$slave_sock \
--character-sets-dir=$CHARSETSDIR \
--default-character-set=$CHARACTER_SET \
- --core \
+ --core --init-rpl-role=slave \
--tmpdir=$MYSQL_TMP_DIR \
--language=$LANGUAGE \
--skip-innodb --skip-slave-start \
--- 1.234/sql/mysqld.cc Tue Oct 9 20:59:41 2001
+++ 1.235/sql/mysqld.cc Wed Oct 10 15:36:34 2001
@@ -2598,7 +2598,7 @@
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 @@
{"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 @@
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:
--- 1.70/sql/sql_show.cc Tue Oct 9 20:56:23 2001
+++ 1.71/sql/sql_show.cc Wed Oct 10 15:36:34 2001
@@ -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
--- 1.63/client/mysqltest.c Sun Oct 7 22:24:03 2001
+++ 1.64/client/mysqltest.c Wed Oct 10 15:36:34 2001
@@ -92,7 +92,7 @@
const char* user = 0, *host = 0, *unix_sock = 0, *opt_basedir="./";
static int port = 0, opt_big_test=0, opt_compress=0;
static uint start_lineno, *lineno;
-const char* manager_user="root",*manager_host="localhost";
+const char* manager_user="root",*manager_host=0;
char *manager_pass=0;
int manager_port=MYSQL_MANAGER_PORT;
int manager_wait_timeout=3;
@@ -655,6 +655,10 @@
{
char* p=q->first_argument;
char com_buf[256],*com_p;
+ if (!manager)
+ {
+ die("Manager is not initialized, manager commands are not possible");
+ }
com_p=strmov(com_buf,op);
com_p=strmov(com_p,"_exec ");
if (!*p)
@@ -2195,8 +2199,9 @@
if (cur_file == file_stack)
*++cur_file = stdin;
*lineno=1;
-#ifndef EMBEDDED_LIBRARY
- init_manager();
+#ifndef EMBEDDED_LIBRARY
+ if (manager_host)
+ init_manager();
#endif
if (!( mysql_init(&cur_con->mysql)))
die("Failed in mysql_init()");
--- 1.2/mysql-test/r/rpl_failsafe.result Tue Oct 9 16:43:04 2001
+++ 1.3/mysql-test/r/rpl_failsafe.result Wed Oct 10 15:36:34 2001
@@ -6,12 +6,24 @@
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 1
+show status like 'Rpl_status';
+Variable_name Value
+Rpl_status AUTH_MASTER
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 2
+show status like 'Rpl_status';
+Variable_name Value
+Rpl_status IDLE_SLAVE
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 3
+show status like 'Rpl_status';
+Variable_name Value
+Rpl_status IDLE_SLAVE
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 4
+show status like 'Rpl_status';
+Variable_name Value
+Rpl_status IDLE_SLAVE
--- 1.2/mysql-test/t/rpl_failsafe.test Tue Oct 9 16:43:04 2001
+++ 1.3/mysql-test/t/rpl_failsafe.test Wed Oct 10 15:36:34 2001
@@ -3,9 +3,13 @@
connect (slave_ter,localhost,root,,test,0,slave.sock-2);
connection master;
show variables like 'rpl_recovery_rank';
+show status like 'Rpl_status';
connection slave;
show variables like 'rpl_recovery_rank';
+show status like 'Rpl_status';
connection slave_sec;
show variables like 'rpl_recovery_rank';
+show status like 'Rpl_status';
connection slave_ter;
show variables like 'rpl_recovery_rank';
+show status like 'Rpl_status';
--- 1.1/sql/repl_failsafe.cc Tue Oct 9 20:56:23 2001
+++ 1.2/sql/repl_failsafe.cc Wed Oct 10 15:36:34 2001
@@ -23,9 +23,9 @@
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",
--- 1.1/sql/repl_failsafe.h Tue Oct 9 20:56:24 2001
+++ 1.2/sql/repl_failsafe.h Wed Oct 10 15:36:34 2001
@@ -9,5 +9,5 @@
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
| Thread |
|---|
| • bk commit into 4.0 tree | sasha | 10 Oct |