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 | 97c4982575a139795a3ac56649db72a0ff31f5c6 (patch) | |
tree | 93768e5ca8014b5fc59dd1bbcddff0cd04b1b199 /mysql-test/r/rpl_loaddata.result | |
parent | a1f5ddca5323319e51926aa92c33bccc95a253d5 (diff) | |
download | mariadb-git-97c4982575a139795a3ac56649db72a0ff31f5c6.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 'mysql-test/r/rpl_loaddata.result')
-rw-r--r-- | mysql-test/r/rpl_loaddata.result | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index b5154ca95cf..05bdad0fb84 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -25,3 +25,29 @@ drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); load data infile '../../std_data/rpl_loaddata.dat' into table t1; +set global sql_slave_skip_counter=1; +start slave; +show slave status; +Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space +127.0.0.1 root MASTER_PORT 1 master-bin.001 1311 slave-relay-bin.002 1352 master-bin.001 Yes Yes 0 0 1311 1352 +set sql_log_bin=0; +delete from t1; +set sql_log_bin=1; +load data infile '../../std_data/rpl_loaddata.dat' into table t1; +stop slave; +change master to master_user='test'; +change master to master_user='root'; +show slave status; +Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space +127.0.0.1 root MASTER_PORT 1 master-bin.001 1442 slave-relay-bin.001 4 master-bin.001 No No 0 0 1442 4 +set global sql_slave_skip_counter=1; +start slave; +set sql_log_bin=0; +delete from t1; +set sql_log_bin=1; +load data infile '../../std_data/rpl_loaddata.dat' into table t1; +stop slave; +reset slave; +show slave status; +Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space +127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.001 4 No No 0 0 0 4 |