diff options
author | unknown <msvensson@neptunus.(none)> | 2006-11-28 15:39:23 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-11-28 15:39:23 +0100 |
commit | 6ee057c676499fd10b004aada1ffbf06a8881464 (patch) | |
tree | ab27752cd87bb7989a78f49667ce88a12ec1fd56 | |
parent | 3bf4108ea9e1cefa7e527e8aabb53eb4e7bd98b1 (diff) | |
download | mariadb-git-6ee057c676499fd10b004aada1ffbf06a8881464.tar.gz |
No need to have a "created_by_mem" file, just read the link and
if that is same as opt_mem it can be removed
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 3305563296e..705b6e76578 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1893,10 +1893,6 @@ sub kill_running_servers () { } } -sub created_by_mem_filename(){ - return "$glob_mysql_test_dir/var/created_by_mem"; -} - # # Remove var and any directories in var/ created by previous @@ -1919,14 +1915,16 @@ sub remove_stale_vardir () { if ( -l $opt_vardir) { # var is a symlink - if (-f created_by_mem_filename() ) + if ( readlink($opt_vardir) eq $opt_mem ) { # Remove the directory which the link points at mtr_verbose("Removing " . readlink($opt_vardir)); rmtree(readlink($opt_vardir)); + # Remove the entire "var" dir mtr_verbose("Removing $opt_vardir/"); rmtree("$opt_vardir/"); + # Remove the "var" symlink mtr_verbose("unlink($opt_vardir)"); unlink($opt_vardir); @@ -1984,10 +1982,6 @@ sub setup_vardir() { mtr_report("Symlinking 'var' to '$opt_mem'"); symlink($opt_mem, $opt_vardir); - - # Put a small file to recognize this dir was created by --mem - mtr_verbose("Creating " . created_by_mem_filename()); - mtr_tofile(created_by_mem_filename(), $opt_mem); } mkpath("$opt_vardir/log"); |