summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2003-06-17 16:35:20 +0200
committerunknown <guilhem@mysql.com>2003-06-17 16:35:20 +0200
commit800bbfa04e0692a78fd790f6ad5b06c48d200d95 (patch)
treeecdf249451ded4477957b41bc8a11eda7a8a2467
parent3286e4e1aee4168a0b32b052b3781e80fa75b923 (diff)
downloadmariadb-git-800bbfa04e0692a78fd790f6ad5b06c48d200d95.tar.gz
Better error reporting in mysql-test-run (don't hide the important message
with 'head'). Test fix (this sync_with_master was nonsense). Now all tests pass in 4.0 in autobuild. mysql-test/mysql-test-run.sh: Error reporting (how mysql-test-run filters the messages which mysqltest prints on stderr) is not reliable. It does a 'head the first line only' which in my case caused me to lose some time, because in fact the worrying message was on the second line (logically, the one which caused the die() is at the end of the $TIMEFILE file, not at the beginning). Doing a 'tail' is better but not perfect (depending on the build, one may get "Maximum memory usage" as the last line); it's always good to have all messages and spot the important one oneself. So we print all $TIMEFILE (that's a few lines at most). mysql-test/t/rpl_rotate_logs.test: Dont sync_with_master as the SQL slave thread may be stopped at this moment; just wait_for_slave_to_stop. Doing sync_with_master caused a non-deterministic behaviour, because (note that save_master_pos was called to early) sometimes MASTER_POS_WAIT() started before the SQL thread died (because of unique violation) so returned 0, other times it started after the SQL thread died so returned NULL (which is reported by mysqltest as an error, on stderr).
-rw-r--r--mysql-test/mysql-test-run.sh4
-rw-r--r--mysql-test/t/rpl_rotate_logs.test3
2 files changed, 3 insertions, 4 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 1d25a4d0e3d..55adc3d88fc 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -569,7 +569,9 @@ error () {
}
error_is () {
- $CAT < $TIMEFILE | $SED -e 's/.* At line \(.*\)\: \(.*\)/ \>\> Error at line \1: \2<\</' | $HEAD -1
+ $ECHO "Errors are (from $TIMEFILE) :"
+ $CAT < $TIMEFILE
+ $ECHO "(the last line(s) may be the ones that caused the die() in mysqltest)"
}
prefix_to_8() {
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index 6edbf363b1a..9f7f44d7c28 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -73,12 +73,9 @@ insert into t2 values(1234);
#same value on the master
connection master;
-save_master_pos;
set insert_id=1234;
insert into t2 values(NULL);
connection slave;
-sync_with_master;
-
wait_for_slave_to_stop;
#restart slave skipping one event