From 43aa130a388f9a683d9476ddf2cfd910777f96e0 Mon Sep 17 00:00:00 2001 From: "msvensson@neptunus.(none)" <> Date: Mon, 23 Oct 2006 12:16:40 +0200 Subject: [PATCH] If "var" is a symlink which does not point to anything, remove it before creating real var --- mysql-test/mysql-test-run.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index acba4d843dd..f429bac850d 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1868,6 +1868,11 @@ sub kill_running_servers () { if ( ! -d $opt_vardir ) { + if ( -l $opt_vardir and ! -d readlink($opt_vardir) ) + { + mtr_report("Removing $opt_vardir symlink without destination"); + unlink($opt_vardir); + } # The "var" dir does not exist already # the processes that mtr_kill_leftovers start will write # their log files to var/log so it should be created