List:Commits« Previous MessageNext Message »
From:msvensson Date:March 2 2006 3:28pm
Subject:bk commit into 5.0 tree (msvensson:1.2096)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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.2096 06/03/02 16:28:45 msvensson@neptunus.(none) +2 -0
  Make the "system" command become executed in a bash shell in cygwin.

  mysql-test/t/mysqldump.test
    1.84 06/03/02 16:28:41 msvensson@neptunus.(none) +2 -2
    Change from " to ' to avoid bash's filename expanding. I.e to avoid that "[mysqltest1]" will be llok for any dirs in mysql-test/* that are named m, y, s, q etc. And ther is actually one dir called t, so we will get a match and thus echo "t" to the file.

  client/mysqltest.c
    1.218 06/03/02 16:28:41 msvensson@neptunus.(none) +12 -1
    Prepend the command to execute by system with "sh" to make it executed by cygwin's bash

# 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-5.0

--- 1.217/client/mysqltest.c	2006-03-02 11:10:25 +01:00
+++ 1.218/client/mysqltest.c	2006-03-02 16:28:41 +01:00
@@ -1367,7 +1367,9 @@
 
   NOTE
    If mysqltest is executed from cygwin shell, the command will be
-   executed in cygwin shell. Thus commands like "rm" etc can be used.
+   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 do_system(struct st_query *command)
@@ -1379,8 +1381,17 @@
 
   init_dynamic_string(&ds_cmd, 0, strlen(command->first_argument) + 64, 256);
 
+#ifdef __WIN__
+  /* Execute the command in "bash", ie. sh -c "<command>" */
+  dynstr_append(&ds_cmd, "sh -c \"");
+#endif
+
   /* Eval the system command, thus replacing all environment variables */
   do_eval(&ds_cmd, command->first_argument, TRUE);
+
+#ifdef __WIN__
+  dynstr_append(&ds_cmd, "\"");
+#endif
 
   DBUG_PRINT("info", ("running system command '%s' as '%s'",
                       command->first_argument, ds_cmd.str));

--- 1.83/mysql-test/t/mysqldump.test	2006-02-24 13:50:22 +01:00
+++ 1.84/mysql-test/t/mysqldump.test	2006-03-02 16:28:41 +01:00
@@ -830,8 +830,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.0 tree (msvensson:1.2096)msvensson2 Mar