List:Commits« Previous MessageNext Message »
From:msvensson Date:October 6 2006 3:45pm
Subject:bk commit into 4.1 tree (msvensson:1.2563)
View as plain text  
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-06 15:45:51+02:00, msvensson@neptunus.(none) +1 -0
  Fix problem with specifying vardir, mysql_version_id is not yet available when vardir
arguments is checked
  so the 4.1 symlink var to vardir trick has to be checked for later in function
"cleanup_stale_files" 

  mysql-test/mysql-test-run.pl@stripped, 2006-10-06 15:45:50+02:00, msvensson@neptunus.(none)
+20 -13
    Fix problem with specifying vardir, mysql_version_id is not yet available when vardir
arguments is checked
    so the 4.1 symlink var to vardir trick has to be checked for later in function
"cleanup_stale_files" 

# 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.97/mysql-test/mysql-test-run.pl	2006-10-06 15:45:55 +02:00
+++ 1.98/mysql-test/mysql-test-run.pl	2006-10-06 15:45:55 +02:00
@@ -142,6 +142,8 @@
 our $path_vardir_trace;          # unix formatted opt_vardir for trace files
 our $opt_tmpdir;                 # A path but set directly on cmd line
 
+our $default_vardir;
+
 our $opt_usage;
 our $opt_suite;
 
@@ -731,17 +733,11 @@
   # Set the "var/" directory, as it is the base for everything else
   # --------------------------------------------------------------------------
 
+  $default_vardir= "$glob_mysql_test_dir/var";
+  mtr_report("default_vardir: $default_vardir");
   if ( ! $opt_vardir )
   {
-    $opt_vardir= "$glob_mysql_test_dir/var";
-  }
-  elsif ( $mysql_version_id < 50000 )
-  {
-    # --vardir was specified
-    # It's only supported in 4.1 as a symlink from var/
-    # by setting up $opt_mem that will be created
-    $opt_mem= $opt_vardir;
-    $opt_vardir= undef;
+    $opt_vardir= $default_vardir;
   }
 
   $path_vardir_trace= $opt_vardir;
@@ -1798,7 +1794,18 @@
 
   mtr_report("Removing Stale Files");
 
-  if ( $opt_vardir eq "$glob_mysql_test_dir/var" )
+  if ( $mysql_version_id < 50000 and
+       $opt_vardir ne $default_vardir )
+  {
+    # Version 4.1 and --vardir was specified
+    # Only supported as a symlink from var/
+    # by setting up $opt_mem that symlink will be created
+    $opt_mem= $opt_vardir;
+    $opt_vardir= $default_vardir;
+    mtr_report("Using 4.1 vardir trick");
+  }
+
+  if ( $opt_vardir eq $default_vardir )
   {
     #
     # Running with "var" in mysql-test dir
@@ -1838,7 +1845,7 @@
 
     # Remove the var/ dir in mysql-test dir if any
     # this could be an old symlink that shouldn't be there
-    rmtree("$glob_mysql_test_dir/var");
+    rmtree($default_vardir);
 
     # Remove the "var" dir
     rmtree("$opt_vardir/");
@@ -1849,7 +1856,7 @@
     # Runinng with var as a link to some "memory" location, normally tmpfs
     rmtree($opt_mem);
     mkpath($opt_mem);
-    mtr_verbose("Creating symlink from $opt_vardir to $opt_mem");
+    mtr_report("Creating symlink from $opt_vardir to $opt_mem");
     symlink($opt_mem, $opt_vardir);
     # Put a small file to recognize this dir was created by --mem
     mtr_tofile($created_by_mem_file, $opt_mem);
@@ -2710,7 +2717,7 @@
 
   # Remove old files produced by mysqltest
   my $result_dir= "r";
-  if ( ! $opt_suite eq "main" )
+  if ( $opt_suite ne "main" )
   {
     $result_dir= "suite/$opt_suite/r";
   }
Thread
bk commit into 4.1 tree (msvensson:1.2563)msvensson6 Oct