a little speed tweak here, setting "SET FOREIGN_KEY_CHECKS = 0" *before* clearing bib/bi/items tables.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Mason James 2008-02-17 17:12:55 +13:00 committed by Joshua Ferraro
parent c3c47af750
commit bdd2afc747
1 changed files with 8 additions and 3 deletions

View File

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