From 4f2c6343fa35d3413dce6689455a3746a4ccdea6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 4 Jan 2011 17:05:21 +0100 Subject: [PATCH] =?utf8?q?Entscheidung,=20welche=20acc=5Ftrans-Eintr=C3=A4?= =?utf8?q?ge=20aktualisiert=20werden=20m=C3=BCssen,=20anhand=20acc=5Ftrans?= =?utf8?q?=5Fid=20treffen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Werden mehrere Einträge mit derselben acc_trans_id gefunden, so darf der erste Eintrag nicht aktualisiert werden, aber die restlichen schon. --- sql/Pg-upgrade2/acc_trans_id_uniqueness.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/Pg-upgrade2/acc_trans_id_uniqueness.pl b/sql/Pg-upgrade2/acc_trans_id_uniqueness.pl index 9c0c4595a..1b8e5cadb 100644 --- a/sql/Pg-upgrade2/acc_trans_id_uniqueness.pl +++ b/sql/Pg-upgrade2/acc_trans_id_uniqueness.pl @@ -47,10 +47,10 @@ SQL do_query($query, 0); - my %entries_by_trans_id; + my %skipped_acc_trans_ids; foreach my $entry (@entries) { - if (!$entries_by_trans_id{ $entry->{trans_id} }) { - $entries_by_trans_id{ $entry->{trans_id} } = []; + if (!$skipped_acc_trans_ids{ $entry->{acc_trans_id} }) { + $skipped_acc_trans_ids{ $entry->{acc_trans_id} } = 1; } else { my $mtime = $entry->{mtime} ? "= '$entry->{mtime}'" : 'IS NULL'; $query = <