diff options
author | unknown <msvensson@shellback.(none)> | 2006-03-23 21:48:31 +0100 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2006-03-23 21:48:31 +0100 |
commit | 636064c0bab4c606bc73b3f4dcacddc5f8d39dd3 (patch) | |
tree | f35409e519b7aa5d2e437aa479de90e6fda370e6 /client | |
parent | 6662707f74c3a925200bb1b3807f8b879ff2d510 (diff) | |
download | mariadb-git-636064c0bab4c606bc73b3f4dcacddc5f8d39dd3.tar.gz |
Dump result to .log file at test failure
client/mysqltest.c:
Dump accumulated result upuntil test failure into a <testname>.log file for later examination
mysql-test/lib/mtr_report.pl:
Inform about the <testname>.log file's existence
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 37f7418e0ef..33170d32adf 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -427,6 +427,7 @@ static VAR* var_init(VAR* v, const char *name, int name_len, const char *val, static void var_free(void* v); void dump_result_to_reject_file(const char *record_file, char *buf, int size); +void dump_result_to_log_file(const char *record_file, char *buf, int size); int close_connection(struct st_query*); static void set_charset(struct st_query*); @@ -634,9 +635,9 @@ static void die(const char *fmt, ...) } va_end(args); - /* Dump the result that has been accumulated so far to reject file */ + /* Dump the result that has been accumulated so far to .log file */ if (result_file && ds_res.length) - dump_result_to_reject_file(result_file, ds_res.str, ds_res.length); + dump_result_to_log_file(result_file, ds_res.str, ds_res.length); /* Clean up and exit */ free_used_memory(); @@ -3139,6 +3140,12 @@ void dump_result_to_reject_file(const char *record_file, char *buf, int size) str_to_file(fn_format(reject_file, record_file,"",".reject",2), buf, size); } +void dump_result_to_log_file(const char *record_file, char *buf, int size) +{ + char log_file[FN_REFLEN]; + str_to_file(fn_format(log_file, record_file,"",".log",2), buf, size); +} + #ifdef __WIN__ |