mariadb/mysql-test/t/rpl000018.test
unknown 0880795793 More error messages. This is intended to help debugging; presently I have a
support issue with an unclear message which can have N reasons for appearing.
This should help us know at which point it failed, and get the errno when
my_open was involved (as the reason for the unclear message is often a
permission problem).
RESET SLAVE resets last_error and last_errno in SHOW SLAVE STATUS (without this,
rpl_loaddata.test, which is expected to generate an error in last_error, influenced
rpl_log_pos.test).
A small test update.
Added STOP SLAVE to mysql-test-run to get rid of several stupid error messages
which are printed while the master restarts and the slave attempts/manages to
connect to it and sends it nonsense binlog requests.


mysql-test/mysql-test-run.sh:
  Before running a test, stop slave threads if they exist (if they don't
  the script goes on fine). This also works fine with the manager.
  Before this change, when the master was stopped/restarted (which happened before
  the slave server was stopped/restarted), the slave threads
  noticed the stop (so printed an error message in slave.err), then managed to
  reconnect (to the new master, the one that is running for the _next_ test),
  and this reconnection had time to produce error messages (because, for example,
  the binlog the slave thread was asking had been deleted) before the slave server
  was killed. This change reduces by 10% (40 lines) slave.err in replication tests.
mysql-test/r/rpl000018.result:
  Result update.
mysql-test/t/rpl000018.test:
  This test does "show master logs" so should do "reset master" instead of
  relying on the previous tests.
sql/slave.cc:
  More error messages.
sql/sql_repl.cc:
  More error messages.
  RESET SLAVE resets last_error and last_errno in SHOW SLAVE STATUS.
2003-06-10 23:29:49 +02:00

29 lines
619 B
Text

#
# Running test with abort-slave-event-count=1
# This will force slave to reconnect after every event
#
require_manager;
connect (master,localhost,root,,test,0,master.sock);
connect (slave,localhost,root,,test,0,slave.sock);
connection master;
reset master;
server_stop master;
server_start master;
connection slave;
reset slave;
slave start;
connection master;
show master logs;
drop table if exists t1;
create table t1(n int);
insert into t1 values (3351);
save_master_pos;
connection slave;
sync_with_master;
select * from t1;
connection master;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;