Below is the list of changes that have just been committed into a local
5.1 repository of kent. When kent 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.2162 06/03/07 18:21:38 kent@stripped +3 -0
Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-tmp
into mysql.com:/Users/kent/mysql/bk/mysql-5.1-new
mysql-test/t/mysqldump.test
1.91 06/03/07 18:21:27 kent@stripped +0 -2
Auto merged
mysql-test/mysql-test-run.pl
1.81 06/03/07 18:21:26 kent@stripped +0 -0
Auto merged
client/mysqltest.c
1.194 06/03/07 18:21:25 kent@stripped +0 -0
Auto merged
# 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: kent
# Host: c-4c4072d5.010-2112-6f72651.cust.bredbandsbolaget.se
# Root: /Users/kent/mysql/bk/mysql-5.1-new/RESYNC
--- 1.80/mysql-test/mysql-test-run.pl 2006-03-03 15:13:05 +01:00
+++ 1.81/mysql-test/mysql-test-run.pl 2006-03-07 18:21:26 +01:00
@@ -703,6 +703,9 @@
$opt_vardir= "$glob_mysql_test_dir/var";
}
$opt_vardir_trace= $opt_vardir;
+ # Chop off any "c:", DBUG likes a unix path ex: c:/src/... => /src/...
+ $opt_vardir_trace=~ s/^\w://;
+
# We make the path absolute, as the server will do a chdir() before usage
unless ( $opt_vardir =~ m,^/, or
($glob_win32 and $opt_vardir =~ m,^[a-z]:/,i) )
--- 1.193/client/mysqltest.c 2006-03-03 21:41:49 +01:00
+++ 1.194/client/mysqltest.c 2006-03-07 18:21:25 +01:00
@@ -1180,8 +1180,6 @@
("error: %d, status: %d", error, status));
for (i= 0; i < query->expected_errors; i++)
{
- DBUG_PRINT("info",
- ("error: %d, status: %d", error, status));
DBUG_PRINT("info", ("expected error: %d",
query->expected_errno[i].code.errnum));
if ((query->expected_errno[i].type == ERR_ERRNO) &&
@@ -1414,6 +1412,35 @@
/*
+ Wrapper for 'system' function
+
+ NOTE
+ If mysqltest is executed from cygwin shell, the command will be
+ executed in the "windows command interpreter" cmd.exe and we prepend "sh"
+ to make it be executed by cygwins "bash". Thus commands like "rm",
+ "mkdir" as well as shellscripts can executed by "system" in Windows.
+
+*/
+
+int my_system(DYNAMIC_STRING* ds_cmd)
+{
+#ifdef __WIN__
+ /* Dump the command into a sh script file and execute with "sh" */
+ int err;
+ char tmp_sh_name[64], tmp_sh_cmd[70];
+ my_snprintf(tmp_sh_name, sizeof(tmp_sh_name), "tmp_%d.sh", getpid());
+ my_snprintf(tmp_sh_cmd, sizeof(tmp_sh_cmd), "sh %s", tmp_sh_name);
+ str_to_file(tmp_sh_name, ds_cmd->str, ds_cmd->length);
+ err= system(tmp_sh_cmd);
+ my_delete(tmp_sh_name, MYF(0));
+ return err;
+#else
+ return system(ds_cmd->str);
+#endif
+}
+
+
+/*
SYNOPSIS
do_system
@@ -1425,14 +1452,12 @@
Eval the query to expand any $variables in the command.
Execute the command with the "system" command.
- NOTE
- If mysqltest is executed from cygwin shell, the command will be
- executed in cygwin shell. Thus commands like "rm" etc can be used.
- */
+*/
-int do_system(struct st_query *command)
+void do_system(struct st_query *command)
{
DYNAMIC_STRING ds_cmd;
+ DBUG_ENTER("do_system");
if (strlen(command->first_argument) == 0)
die("Missing arguments to system, nothing to do!");
@@ -1444,7 +1469,7 @@
DBUG_PRINT("info", ("running system command '%s' as '%s'",
command->first_argument, ds_cmd.str));
- if (system(ds_cmd.str))
+ if (my_system(&ds_cmd))
{
if (command->abort_on_error)
die("system command '%s' failed", command->first_argument);
@@ -1456,7 +1481,7 @@
}
command->last_argument= command->end;
- return 0;
+ DBUG_VOID_RETURN;
}
@@ -1795,6 +1820,7 @@
char *p= query->first_argument;
char *sleep_start, *sleep_end= query->end;
double sleep_val;
+ const char *cmd = (real_sleep ? "real_sleep" : "sleep");
while (my_isspace(charset_info, *p))
p++;
@@ -2764,7 +2790,7 @@
*/
-int do_block(enum block_cmd cmd, struct st_query* q)
+void do_block(enum block_cmd cmd, struct st_query* q)
{
char *p= q->first_argument;
const char *expr_start, *expr_end;
@@ -2788,7 +2814,7 @@
cur_block++;
cur_block->cmd= cmd;
cur_block->ok= FALSE;
- return 0;
+ DBUG_VOID_RETURN;
}
/* Parse and evaluate test expression */
@@ -3704,7 +3730,7 @@
static void free_win_path_patterns()
{
- int i= 0;
+ uint i= 0;
for (i=0 ; i < patterns.elements ; i++)
{
const char** pattern= dynamic_element(&patterns, i, const char**);
--- 1.90/mysql-test/t/mysqldump.test 2006-02-28 23:22:05 +01:00
+++ 1.91/mysql-test/t/mysqldump.test 2006-03-07 18:21:27 +01:00
@@ -840,8 +840,8 @@
# Bugs #9136, #12917: problems with --defaults-extra-file option
#
---system echo "[mysqltest1]" > $MYSQLTEST_VARDIR/tmp/tmp.cnf
---system echo "port=1234" >> $MYSQLTEST_VARDIR/tmp/tmp.cnf
+--system echo '[mysqltest1]' > $MYSQLTEST_VARDIR/tmp/tmp.cnf
+--system echo 'port=1234' >> $MYSQLTEST_VARDIR/tmp/tmp.cnf
--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1
--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1
--system rm $MYSQLTEST_VARDIR/tmp/tmp.cnf
| Thread |
|---|
| • bk commit into 5.1 tree (kent:1.2162) | kent | 7 Mar |