summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2005-12-13 18:07:13 +0100
committerunknown <msvensson@neptunus.(none)>2005-12-13 18:07:13 +0100
commit3a9307fdb970f77dfe062e345a9400fff099e5e1 (patch)
treeb822a919a3564d199504421023e30dc743db56d7 /client
parent70b07b1e97c2f1417d93c39026a7cd6375ac9cf4 (diff)
downloadmariadb-git-3a9307fdb970f77dfe062e345a9400fff099e5e1.tar.gz
Fix tests after merge
Straighten out and comment behaviour for --require and --result in run_query client/mysqltest.c: If --require or --result has been provided for a query command->record_file file be set. In that case it should either dump to file if recording or check with content in file if running. mysql-test/r/mysqltest.result: Fix up tests and results after merge mysql-test/t/mysqltest.test: Fix up tests and results after merge
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 135fa370688..3f8b6582eb9 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -3925,22 +3925,26 @@ static void run_query(MYSQL *mysql, struct st_query *command, int flags)
mysql_errno(mysql), mysql_error(mysql));
}
- if (record)
+ if (command->record_file[0])
{
- /* Recording in progress */
- if (!command->record_file[0])
- die("Missing result file");
- /* Dump the output from _this_ query to the specified record_file */
- str_to_file(command->record_file, ds->str, ds->length);
- }
- else if (command->record_file[0])
- {
- /*
- The output from _this_ query should be checked against an already
- existing file which has been specified using --require or --result
- */
- check_result(ds, command->record_file, command->require_file);
+ /* A result file was specified for _this_ query */
+ if (record)
+ {
+ /*
+ Recording in progress
+ Dump the output from _this_ query to the specified record_file
+ */
+ str_to_file(command->record_file, ds->str, ds->length);
+
+ } else {
+
+ /*
+ The output from _this_ query should be checked against an already
+ existing file which has been specified using --require or --result
+ */
+ check_result(ds, command->record_file, command->require_file);
+ }
}
dynstr_free(&ds_warnings);