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@stripped, 2006-10-19 13:34:09+02:00, msvensson@neptunus.(none) +3 -0
Add command "exit" to mysqltest, it will stop processing any more
commands and go directly to result file processing
client/mysqltest.c@stripped, 2006-10-19 13:34:08+02:00, msvensson@neptunus.(none) +10 -3
Add command "exit" to mysqltest
mysql-test/r/mysqltest.result@stripped, 2006-10-19 13:34:08+02:00, msvensson@neptunus.(none) +2 -0
Add command "exit" to mysqltest
mysql-test/t/mysqltest.test@stripped, 2006-10-19 13:34:08+02:00, msvensson@neptunus.(none) +14 -0
Add command "exit" to mysqltest
# 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/mysql-4.1-maint
--- 1.18/mysql-test/r/mysqltest.result 2006-10-19 13:34:12 +02:00
+++ 1.19/mysql-test/r/mysqltest.result 2006-10-19 13:34:12 +02:00
@@ -518,4 +518,6 @@
mysqltest: At line 1: Max delimiter length(16) exceeded
hello
hello
+mysqltest: At line 1: test of die
+Some output
End of tests
--- 1.22/mysql-test/t/mysqltest.test 2006-10-19 13:34:12 +02:00
+++ 1.23/mysql-test/t/mysqltest.test 2006-10-19 13:34:12 +02:00
@@ -1548,5 +1548,19 @@
print "hello\n";
EOF
+# ----------------------------------------------------------------------------
+# test for die
+# ----------------------------------------------------------------------------
+
+--error 1
+--exec echo "die test of die;" | $MYSQL_TEST 2>&1
+
+
+# ----------------------------------------------------------------------------
+# test for exit
+# ----------------------------------------------------------------------------
+
+--exec echo "echo Some output; exit; echo Not this;" | $MYSQL_TEST 2>&1
+
--echo End of tests
--- 1.217/client/mysqltest.c 2006-10-19 13:34:12 +02:00
+++ 1.218/client/mysqltest.c 2006-10-19 13:34:12 +02:00
@@ -264,7 +264,7 @@
Q_IF,
Q_DISABLE_PARSING, Q_ENABLE_PARSING,
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
- Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE,
+ Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT,
Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
@@ -345,6 +345,8 @@
"copy_file",
"perl",
"die",
+ /* Don't execute any more commands, compare result */
+ "exit",
0
};
@@ -5429,7 +5431,7 @@
int main(int argc, char **argv)
{
struct st_command *command;
- my_bool q_send_flag= 0;
+ my_bool q_send_flag= 0, abort_flag= 0;
uint command_executed= 0, last_command_executed= 0;
char save_file[FN_REFLEN];
MY_STAT res_info;
@@ -5549,7 +5551,7 @@
open_file(opt_include);
}
- while (!read_command(&command))
+ while (!read_command(&command) && !abort_flag)
{
int current_line_inc = 1, processed = 0;
if (command->type == Q_UNKNOWN || command->type == Q_COMMENT_WITH_COMMAND)
@@ -5777,7 +5779,12 @@
die("Parsing is already enabled");
break;
case Q_DIE:
+ /* Abort test with error code and error message */
die("%s", command->first_argument);
+ break;
+ case Q_EXIT:
+ /* Stop processing any more commands */
+ abort_flag= 1;
break;
case Q_RESULT:
| Thread |
|---|
| • bk commit into 4.1 tree (msvensson:1.2591) | msvensson | 19 Oct |