diff options
author | Rafal Somla <Rafal.Somla@sun.com> | 2009-02-13 16:27:33 +0100 |
---|---|---|
committer | Rafal Somla <Rafal.Somla@sun.com> | 2009-02-13 16:27:33 +0100 |
commit | bdbe393db1b55cbde9aa4ca66cc551b57dad7f1f (patch) | |
tree | 14250666294c2f2bd6d4d354481e27ae728c8658 /client | |
parent | 05b6c2713edd1a37383ac8168130385d109769c7 (diff) | |
download | mariadb-git-bdbe393db1b55cbde9aa4ca66cc551b57dad7f1f.tar.gz |
Modifications to MTR and mysqltest to improve feedback from the latter when
testcase checks are made.
MTR spawns mysqltest to run check-testcase test before and after each testcase
it runs. It can also run check-warnings using mysqltest. Since it happened on PB
that these checks hanged, this patch provides additional feedback to help
investigating such failures:
- mysqltest is modified to give feedback about main steps in execution of a
testcase if run in verbose mode (including connection to the server),
- MTR is modified to run mysqltest in verbose mode when doing check-testcase or
check-warnings. The diagnostic output from mysqltest is preserved so that it is
saved upon test failure.
client/mysqltest.cc:
Add verbose messages informing about main steps in execution of a testcase.
mysql-test/mysql-test-run.pl:
- When doing check-testcase or check-warnings run mysqltest in verbose mode.
- Do not delete the mysqltest's error log if errors are detected during these
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 89b9c78a049..e9e462b8d3f 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -4647,6 +4647,10 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host, int failed_attempts= 0; DBUG_ENTER("safe_connect"); + + verbose_msg("Connecting to server %s:%d (socket %s) as '%s'" + ", connection '%s', attempt %d ...", + host, port, sock, user, name, failed_attempts); while(!mysql_real_connect(mysql, host,user, pass, db, port, sock, CLIENT_MULTI_STATEMENTS | CLIENT_REMEMBER_OPTIONS)) { @@ -4678,6 +4682,7 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host, } failed_attempts++; } + verbose_msg("... Connected."); DBUG_VOID_RETURN; } @@ -7511,8 +7516,12 @@ int main(int argc, char **argv) parse_args(argc, argv); log_file.open(opt_logdir, result_file_name, ".log"); + verbose_msg("Logging to '%s'.", log_file.file_name()); if (opt_mark_progress) + { progress_file.open(opt_logdir, result_file_name, ".progress"); + verbose_msg("Tracing progress in '%s'.", progress_file.file_name()); + } var_set_int("$PS_PROTOCOL", ps_protocol); var_set_int("$SP_PROTOCOL", sp_protocol); @@ -7521,6 +7530,8 @@ int main(int argc, char **argv) DBUG_PRINT("info",("result_file: '%s'", result_file_name ? result_file_name : "")); + verbose_msg("Results saved in '%s'.", + result_file_name ? result_file_name : ""); if (mysql_server_init(embedded_server_arg_count, embedded_server_args, (char**) embedded_server_groups)) @@ -7591,6 +7602,7 @@ int main(int argc, char **argv) open_file(opt_include); } + verbose_msg("Start processing test commands from '%s' ...", cur_file->file_name); while (!read_command(&command) && !abort_flag) { int current_line_inc = 1, processed = 0; @@ -7908,6 +7920,7 @@ int main(int argc, char **argv) log_file.close(); start_lineno= 0; + verbose_msg("... Done processing test commands."); if (parsing_disabled) die("Test ended with parsing disabled"); @@ -7958,6 +7971,7 @@ int main(int argc, char **argv) if (!command_executed && result_file_name) die("No queries executed but result file found!"); + verbose_msg("Test has succeeded!"); timer_output(); /* Yes, if we got this far the test has suceeded! Sakila smiles */ cleanup_and_exit(0); |