Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2411 05/09/20 14:11:58 msvensson@neptunus.(none) +4 -0
BUG#12959 mysqltest crashes if testcase passed with -x option
- Enable testcases after help from Serg
mysql-test/t/mysqltest.test
1.17 05/09/20 14:11:55 msvensson@neptunus.(none) +5 -5
Add test for mysqltest -x
mysql-test/r/mysqltest.result
1.13 05/09/20 14:11:55 msvensson@neptunus.(none) +4 -0
Add test for mysqltest -x
mysql-test/mysql-test-run.pl
1.42 05/09/20 14:11:55 msvensson@neptunus.(none) +12 -7
Don't add all args to the MYSQL_TEST environment variable.
client/mysqltest.c
1.183 05/09/20 14:11:55 msvensson@neptunus.(none) +16 -8
Dump output to stdout if no result file is specified
Don't print verbose_msg when command fails whith expected error
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/fix_mysqltest/my41-fix_mysqltest
--- 1.41/mysql-test/mysql-test-run.pl 2005-09-01 17:19:14 +02:00
+++ 1.42/mysql-test/mysql-test-run.pl 2005-09-20 14:11:55 +02:00
@@ -2155,11 +2155,6 @@
mtr_add_arg($args, "--big-test");
}
- if ( $opt_record )
- {
- mtr_add_arg($args, "--record");
- }
-
if ( $opt_compress )
{
mtr_add_arg($args, "--compress");
@@ -2185,8 +2180,6 @@
$glob_mysql_test_dir);
}
- mtr_add_arg($args, "-R");
- mtr_add_arg($args, $tinfo->{'result_file'});
# ----------------------------------------------------------------------
# If embedded server, we create server args to give mysqltest to pass on
@@ -2201,6 +2194,18 @@
# export MYSQL_TEST variable containing <path>/mysqltest <args>
# ----------------------------------------------------------------------
$ENV{'MYSQL_TEST'}= "$exe_mysqltest " . join(" ", @$args);
+
+ # ----------------------------------------------------------------------
+ # Add arguments that should not go into the MYSQL_TEST env var
+ # ----------------------------------------------------------------------
+
+ mtr_add_arg($args, "-R");
+ mtr_add_arg($args, $tinfo->{'result_file'});
+
+ if ( $opt_record )
+ {
+ mtr_add_arg($args, "--record");
+ }
return mtr_run_test($exe,$args,$tinfo->{'path'},"",$path_timefile,"");
}
--- 1.12/mysql-test/r/mysqltest.result 2005-09-07 16:39:13 +02:00
+++ 1.13/mysql-test/r/mysqltest.result 2005-09-20 14:11:55 +02:00
@@ -345,6 +345,10 @@
mysqltest: At line 1: Invalid integer argument "10!"
mysqltest: At line 1: End of line junk detected: "!"
mysqltest: At line 1: Invalid integer argument "a"
+Output from mysqltest-x.inc
+Output from mysqltest-x.inc
+Output from mysqltest-x.inc
+mysqltest: Could not open ./non_existing_file.inc: errno = 2
failing_statement;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'failing_statement' at line 1
failing_statement;
--- 1.16/mysql-test/t/mysqltest.test 2005-09-07 16:39:13 +02:00
+++ 1.17/mysql-test/t/mysqltest.test 2005-09-20 14:11:55 +02:00
@@ -810,11 +810,11 @@
# ----------------------------------------------------------------------------
# -x <file_name>, use the file specified after -x as the test file
-#--exec $MYSQL_TEST < $MYSQL_TEST_DIR/include/mysqltest-x.inc 2>&1
-#--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/include/mysqltest-x.inc 2>&1
-#--exec $MYSQL_TEST --result_file=$MYSQL_TEST_DIR/include/mysqltest-x.inc 2>&1
-#--error 1
-#--exec $MYSQL_TEST -x non_existing_file.inc 2>&1
+--exec $MYSQL_TEST < $MYSQL_TEST_DIR/include/mysqltest-x.inc
+--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/include/mysqltest-x.inc
+--exec $MYSQL_TEST --test_file=$MYSQL_TEST_DIR/include/mysqltest-x.inc
+--error 1
+--exec $MYSQL_TEST -x non_existing_file.inc 2>&1
# ----------------------------------------------------------------------------
--- 1.182/client/mysqltest.c 2005-09-20 12:13:12 +02:00
+++ 1.183/client/mysqltest.c 2005-09-20 14:11:55 +02:00
@@ -1062,8 +1062,8 @@
(query->expected_errno[i].code.errnum == status))
{
ok= 1;
- verbose_msg("command \"%s\" failed with expected error: %d",
- cmd, status);
+ DBUG_PRINT("info", ("command \"%s\" failed with expected error: %d",
+ cmd, status));
}
}
if (!ok)
@@ -2557,7 +2557,7 @@
fn_format(buff, argument, "", "", 4);
DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0);
if (!(cur_file->file=
- my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(MY_WME))))
+ my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0))))
die("Could not open %s: errno = %d", buff, errno);
cur_file->file_name= my_strdup(buff, MYF(MY_FAE));
break;
@@ -2663,7 +2663,7 @@
fname=buff;
}
fn_format(buff,fname,"","",4);
-
+
if ((fd = my_open(buff, O_WRONLY | O_CREAT | O_TRUNC,
MYF(MY_WME | MY_FFNF))) < 0)
die("Could not open %s: errno = %d", buff, errno);
@@ -4043,12 +4043,20 @@
parser.current_line += current_line_inc;
}
- if (result_file && ds_res.length && !error)
+ if (ds_res.length && !error)
{
- if (!record)
- error |= check_result(&ds_res, result_file, q->require_file);
+ if (result_file)
+ {
+ if (!record)
+ error |= check_result(&ds_res, result_file, q->require_file);
+ else
+ str_to_file(result_file, ds_res.str, ds_res.length);
+ }
else
- str_to_file(result_file, ds_res.str, ds_res.length);
+ {
+ // Print the result to stdout
+ printf("%s", ds_res.str);
+ }
}
dynstr_free(&ds_res);
| Thread |
|---|
| • bk commit into 4.1 tree (msvensson:1.2411) BUG#12959 | msvensson | 20 Sep |