summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <df@kahlann.erinye.com>2006-12-07 16:06:29 +0100
committerunknown <df@kahlann.erinye.com>2006-12-07 16:06:29 +0100
commit60b3a86ad4b8b3ba3a0626191d106a20f0b2e871 (patch)
tree99f263582332f293958d161b7517aa1f8820586d /mysql-test
parentc29d22c96dd972c890cce5fc3a27138c50a4ce37 (diff)
downloadmariadb-git-60b3a86ad4b8b3ba3a0626191d106a20f0b2e871.tar.gz
do not autorelease build ids when a child of mysql-test-run.pl dies
mysql-test/lib/mtr_unique.pl: do not autorelease build ids when a child dies
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);
+ }
}
}