diff options
author | df@kahlann.erinye.com <> | 2006-12-07 16:06:29 +0100 |
---|---|---|
committer | df@kahlann.erinye.com <> | 2006-12-07 16:06:29 +0100 |
commit | 19ec379b15a9e04f22bc33285628872ab831825e (patch) | |
tree | 99f263582332f293958d161b7517aa1f8820586d /mysql-test | |
parent | 77965c013cc99c153121cd33e74b18eeae29168a (diff) | |
download | mariadb-git-19ec379b15a9e04f22bc33285628872ab831825e.tar.gz |
do not autorelease build ids when a child of mysql-test-run.pl dies
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/lib/mtr_unique.pl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mysql-test/lib/mtr_unique.pl b/mysql-test/lib/mtr_unique.pl index a8fb320c773..3adc8413576 100644 --- a/mysql-test/lib/mtr_unique.pl +++ b/mysql-test/lib/mtr_unique.pl @@ -10,10 +10,16 @@ use Fcntl ':flock'; # Requested IDs are stored in a hash and released upon END. # my %mtr_unique_assigned_ids = (); +my $mtr_unique_pid; +BEGIN { + $mtr_unique_pid = $$ unless defined $mtr_unique_pid; +} END { - while(my ($id,$file) = each(%mtr_unique_assigned_ids)) { - print "Autoreleasing $file:$id\n"; - mtr_release_unique_id($file, $id); + if($mtr_unique_pid == $$) { + while(my ($id,$file) = each(%mtr_unique_assigned_ids)) { + print "Autoreleasing $file:$id\n"; + mtr_release_unique_id($file, $id); + } } } |