summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <df@kahlann.erinye.com>2006-12-11 10:45:39 +0100
committerunknown <df@kahlann.erinye.com>2006-12-11 10:45:39 +0100
commit9a084eaca6f05786b01daca6932095720f70bb76 (patch)
tree66900d2312e6800bef2a079c27d78cd967cec625 /mysql-test
parente54bbaa3fb8793905d37af808b9bee6a49df358a (diff)
parentee876b26453a2a9a7c424834b681ebb8e9f8fb80 (diff)
downloadmariadb-git-9a084eaca6f05786b01daca6932095720f70bb76.tar.gz
Merge kahlann.erinye.com:/home/df/mysql/build/mysql-5.1
into kahlann.erinye.com:/home/df/mysql/build/mysql-5.1-build
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/lib/mtr_unique.pl12
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);
+ }
}
}