a little speed tweak here, setting "SET FOREIGN_KEY_CHECKS = 0" *before* clearing...
authorMason James <mtj@liblime.com>
Sun, 17 Feb 2008 04:12:55 +0000 (17:12 +1300)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 19 Feb 2008 04:07:09 +0000 (22:07 -0600)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
misc/migration_tools/bulkmarcimport.pl

index 3497285..f55bf13 100755 (executable)
@@ -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";
 }