From bdd2afc7471f4a2a8bf830180689d08b14f6e6cf Mon Sep 17 00:00:00 2001 From: Mason James Date: Sun, 17 Feb 2008 17:12:55 +1300 Subject: [PATCH] a little speed tweak here, setting "SET FOREIGN_KEY_CHECKS = 0" *before* clearing bib/bi/items tables. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- misc/migration_tools/bulkmarcimport.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 34972854ed..f55bf13b07 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -84,6 +84,11 @@ my $dbh = C4::Context->dbh; my $CataloguingLog = C4::Context->preference('CataloguingLog'); $dbh->do("UPDATE systempreferences SET value=0 WHERE variable='CataloguingLog'"); +if ($fk_off) { + $dbh->do("SET FOREIGN_KEY_CHECKS = 0"); +} + + if ($delete) { print "deleting biblios\n"; $dbh->do("truncate biblio"); @@ -91,9 +96,9 @@ if ($delete) { $dbh->do("truncate items"); $dbh->do("truncate zebraqueue"); } -if ($fk_off) { - $dbh->do("SET FOREIGN_KEY_CHECKS = 0"); -} + + + if ($test_parameter) { print "TESTING MODE ONLY\n DOING NOTHING\n===============\n"; } -- 2.39.5