summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authorunknown <baker@bk-internal.mysql.com>2006-12-18 17:57:34 +0100
committerunknown <baker@bk-internal.mysql.com>2006-12-18 17:57:34 +0100
commit2b0189b8120b068cb2fc7621d286e1ac1956b055 (patch)
treef463c582366219318920e4d19117d48624233b4f /mysql-test/lib
parentdcbf618831313cbc68c3e73975755738ed20f763 (diff)
parent8a2b3baaa9da6b94f0f609c1959ad00929ec7621 (diff)
downloadmariadb-git-2b0189b8120b068cb2fc7621d286e1ac1956b055.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into bk-internal.mysql.com:/data0/bk/mysql-5.1-arch sql/field.cc: Auto merged sql/field.h: Auto merged sql/sql_load.cc: Auto merged
Diffstat (limited to 'mysql-test/lib')
-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);
+ }
}
}