diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-04-11 16:29:15 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-04-11 16:29:15 -0600 |
commit | 72ccee9d37277f76f68598ef0681d28719db5d6f (patch) | |
tree | 4b54b1d16fbc8694f89016164d367301b93b1880 /sql | |
parent | f21a521981eb945982a81926cdc01735b689f2f0 (diff) | |
download | mariadb-git-72ccee9d37277f76f68598ef0681d28719db5d6f.tar.gz |
fixed bugs in the new stuff in rpl000001 test
start slave thread if master.info is present and server_id is set
updates for rpl000015 and rpl000016 to remove master.info to make sure
master info struct does not get auto-initialized
Docs/manual.texi:
updates for recent changes
mysql-test/r/rpl000001.result:
update for test case change
mysql-test/t/rpl000001.test:
fixed bugs in the test case
mysql-test/t/rpl000015.test:
wrong change - to be reversed
sql/mysqld.cc:
start slave thread if master.info is present and server_id is set
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d09ad7513e0..ccdcda7f180 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -17,6 +17,7 @@ #include "mysql_priv.h" #include <mysql.h> #include <m_ctype.h> +#include <my_dir.h> #include "sql_acl.h" #include "slave.h" #ifdef HAVE_BERKELEY_DB @@ -1712,6 +1713,18 @@ int main(int argc, char **argv) using_update_log=1; } + //make sure slave thread gets started + // if server_id is set, valid master.info is present, and master_host has + // not been specified + if(server_id && !master_host) + { + char fname[FN_REFLEN+128]; + MY_STAT stat_area; + fn_format(fname, master_info_file, mysql_data_home, "", 4+16+32); + if(my_stat(fname, &stat_area, MYF(0)) && !init_master_info(&glob_mi)) + master_host = glob_mi.host; + } + if (opt_bin_log && !server_id) { server_id= !master_host ? 1 : 2; |