List:Commits« Previous MessageNext Message »
From:Matthias Leich Date:June 19 2009 4:22pm
Subject:bzr commit into mysql-pe branch (Matthias.Leich:3382)
View as plain text  
#At file:///work2/6.0/mysql-6.0-bugteam-cs_coll/ based on revid:matthias.leich@stripped

 3382 Matthias Leich	2009-06-19 [merge]
      Merge latest changes into local tree, no conflicts

    modified:
      scripts/mysqld_multi.sh
=== modified file 'scripts/mysqld_multi.sh'
--- a/scripts/mysqld_multi.sh	2009-04-28 18:28:03 +0000
+++ b/scripts/mysqld_multi.sh	2009-06-19 15:32:10 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 
 use Getopt::Long;
-use POSIX qw(strftime);
+use POSIX qw(strftime getcwd);
 
 $|=1;
 $VER="2.16";
@@ -295,6 +295,7 @@ sub start_mysqlds()
   {
     @options = defaults_for_group($groups[$i]);
 
+    $basedir_found= 0; # The default
     $mysqld_found= 1; # The default
     $mysqld_found= 0 if (!length($mysqld));
     $com= "$mysqld";
@@ -310,6 +311,14 @@ sub start_mysqlds()
 	$com= $options[$j];
         $mysqld_found= 1;
       }
+      elsif ("--basedir=" eq substr($options[$j], 0, 10))
+      {
+        $basedir= $options[$j];
+        $basedir =~ s/^--basedir=//;
+        $basedir_found= 1;
+        $options[$j]= quote_shell_word($options[$j]);
+        $tmp.= " $options[$j]";
+      }
       else
       {
 	$options[$j]= quote_shell_word($options[$j]);
@@ -337,7 +346,16 @@ sub start_mysqlds()
       print "group [$groups[$i]] separately.\n";
       exit(1);
     }
+    if ($basedir_found)
+    {
+      $curdir=getcwd();
+      chdir($basedir) or die "Can't change to datadir $basedir";
+    }
     system($com);
+    if ($basedir_found)
+    {
+      chdir($curdir) or die "Can't change back to original dir $curdir";
+    }
   }
   if (!$i && !$opt_no_log)
   {


Attachment: [text/bzr-bundle] bzr/matthias.leich@sun.com-20090619162244-03lxl1f6t5ip3ko5.bundle
Thread
bzr commit into mysql-pe branch (Matthias.Leich:3382)Matthias Leich19 Jun