diff options
author | unknown <guilhem@mysql.com> | 2003-08-04 10:59:44 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2003-08-04 10:59:44 +0200 |
commit | d8df84aa438a2dfe4a90d7889713c2ccd52cca1d (patch) | |
tree | 93768e5ca8014b5fc59dd1bbcddff0cd04b1b199 /sql/slave.h | |
parent | 3b013646e1550d22dff01dd02c8d12118a563fe2 (diff) | |
download | mariadb-git-d8df84aa438a2dfe4a90d7889713c2ccd52cca1d.tar.gz |
2 bugfixes:
- Bug #985: "Between RESET SLAVE and START SLAVE, SHOW SLAVE STATUS is wrong."
Now RESET SLAVE puts correct info in mi->host etc. A new test rpl_reset_slave
for that.
- Bug #986: "CHANGE MASTER & START SLAVE do not reset error columns in SHOW
SLAVE STATUS". Now these reset the errors.
mysql-test/r/rpl_loaddata.result:
result update.
mysql-test/t/rpl_loaddata.test:
Test that RESET SLAVE, START SLAVE and CHANGE MASTER all reset
Last_slave_error and Last_slave_errno (columns of SHOW SLAVE STATUS).
We do it in this test because that's one of tests which have
an intentional query error on the slave.
sql/slave.cc:
As we need TWICE the code to copy command-line options (--master-host etc)
to mi (we already had it in init_master_info, but we also need it in RESET
SLAVE to fix bug#985), I make a function of this code.
And a function to reset Last_slave_error and Last_slave_errno (we need
it in CHANGE MASTER, RESET SLAVE, and at the start of the SQL thread).
sql/slave.h:
declarations for new functions.
sql/sql_repl.cc:
copy --master-host etc to mi in RESET SLAVE, so that SHOW SLAVE STATUS
shows correct information.
Diffstat (limited to 'sql/slave.h')
-rw-r--r-- | sql/slave.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/slave.h b/sql/slave.h index d1fd54d3c04..193b0ab9dd7 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -389,6 +389,8 @@ void skip_load_data_infile(NET* net); void slave_print_error(RELAY_LOG_INFO* rli, int err_code, const char* msg, ...); void end_slave(); /* clean up */ +void init_master_info_with_options(MASTER_INFO* mi); +void clear_last_slave_error(RELAY_LOG_INFO* rli); int init_master_info(MASTER_INFO* mi, const char* master_info_fname, const char* slave_info_fname, bool abort_if_no_master_info_file); |