diff options
author | unknown <gbichot@production.mysql.com> | 2005-07-04 22:27:16 +0200 |
---|---|---|
committer | unknown <gbichot@production.mysql.com> | 2005-07-04 22:27:16 +0200 |
commit | 1a260574283bbd510745e15862e5f02f7cde14b9 (patch) | |
tree | baf0c231ae2622de89fc8f58bf7dbb40271dadc6 /mysql-test/t/rpl_until.test | |
parent | ba50dc04d2b8726484c459a50127487273166189 (diff) | |
download | mariadb-git-1a260574283bbd510745e15862e5f02f7cde14b9.tar.gz |
Making rpl_until more robust if machine is slow. Removing rpl_trunc_binlog
which is wrong now that slave recovers gracefully from a crashed binlog (thx Serg).
stat -> my_stat in my_copy.c so that failing stat() does not hang client connection.
BitKeeper/deleted/.del-rpl_trunc_binlog.test~961b1f6ac73d37c8:
Delete: mysql-test/t/rpl_trunc_binlog.test
BitKeeper/deleted/.del-rpl_trunc_binlog.result~14b4a61886a332e8:
Delete: mysql-test/r/rpl_trunc_binlog.result
mysql-test/std_data/trunc_binlog.000001:
Rename: BitKeeper/deleted/.del-trunc_binlog.000001~b504d840c7efde25 -> mysql-test/std_data/trunc_binlog.000001
mysql-test/t/rpl_until.test:
making test more robust if machine is slow. We still need to sleep before testing if slave SQL thread stopped, because otherwise it may not have started yet when we test for stop, then we would return too early. When we have "START SLAVE" wait a few secs until slave threads actually started well (WL#2688) these "sleep 2" could be removed.
mysys/my_copy.c:
Using my_stat() instead of stat(). Reason is that my_stat() reports an error message if wanted (MY_WME),
which is critical for an error being sent to the client. Before this patch, a failing stat() caused
the client connection to hang (because error was not set because my_error was never called).
Adding an assertion to match the comment at the start of the function.
Diffstat (limited to 'mysql-test/t/rpl_until.test')
-rw-r--r-- | mysql-test/t/rpl_until.test | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mysql-test/t/rpl_until.test b/mysql-test/t/rpl_until.test index 714719f5441..c1aee2cb1db 100644 --- a/mysql-test/t/rpl_until.test +++ b/mysql-test/t/rpl_until.test @@ -26,6 +26,7 @@ show binlog events; connection slave; start slave until master_log_file='master-bin.000001', master_log_pos=319; sleep 2; +wait_for_slave_to_stop; # here table should be still not deleted select * from t1; --replace_result $MASTER_MYPORT MASTER_MYPORT @@ -37,13 +38,15 @@ start slave until master_log_file='master-no-such-bin.000001', master_log_pos=29 # again this table should be still not deleted select * from t1; sleep 2; +wait_for_slave_to_stop; --replace_result $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 9 # 23 # 33 # show slave status; # try replicate all until second insert to t2; start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; -sleep 4; +sleep 2; +wait_for_slave_to_stop; select * from t2; --replace_result $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 9 # 23 # 33 # @@ -59,8 +62,8 @@ stop slave; # this should stop immediately as we are already there start slave until master_log_file='master-bin.000001', master_log_pos=776; -# 2 is not enough when running with valgrind -real_sleep 4 +sleep 2; +wait_for_slave_to_stop; # here the sql slave thread should be stopped --replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 --replace_column 1 # 9 # 23 # 33 # |