From e98a3ba2c4d57ce2d3d1775a1e478a49f44595e6 Mon Sep 17 00:00:00 2001 From: tgarip1957 Date: Sat, 20 May 2006 00:13:31 +0000 Subject: [PATCH] Lock tables was repeated twice --fixed --- misc/marc_into_authority.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/marc_into_authority.pl b/misc/marc_into_authority.pl index 08a2e4d130..1befaf109d 100644 --- a/misc/marc_into_authority.pl +++ b/misc/marc_into_authority.pl @@ -41,7 +41,6 @@ while (( my $cols)=$sthcols->fetchrow){ $columns{$cols}=1; } ##Update the database if missing fields; - $dbh->do("LOCK TABLES auth_header WRITE, auth_subfield_structure WRITE , auth_subfield_table READ"); unless ($columns{'link'}){ my $sth=$dbh->prepare("ALTER TABLE auth_subfield_structure ADD COLUMN `link` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 "); $sth->execute(); @@ -58,6 +57,7 @@ unless ($columns{'kohafield'}){ my $sth=$dbh->prepare("ALTER TABLE auth_subfield_structure ADD COLUMN `kohafield` VARCHAR(45) NOT NULL "); $sth->execute(); } +$dbh->do("UNLOCK TABLES "); my $sth=$dbh->prepare("select authid,authtypecode from auth_header "); $sth->execute(); @@ -78,7 +78,7 @@ $timeneeded = gettimeofday - $starttime unless ($i % 1000); print "." unless ($i % 500); $i++; } -$dbh->do("UNLOCK TABLES "); + sub AUTHgetauthorityold { # Returns MARC::Record of the biblio passed in parameter. -- 2.39.5