1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge kahlann.erinye.com:/home/df/mysql/build/mysql-4.1

into  kahlann.erinye.com:/home/df/mysql/build/mysql-4.1-build
This commit is contained in:
unknown
2006-12-11 10:51:29 +01:00
4 changed files with 16 additions and 9 deletions

View File

@ -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);
}
}
}