[Koha-bugs] [Bug 12488] New: bulkmarcimport.pl -d option should use DELETE instead of TRUNCATE
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 26 15:25:45 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488
Bug ID: 12488
Summary: bulkmarcimport.pl -d option should use DELETE instead
of TRUNCATE
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: P5 - low
Component: Command-line Utilities
Assignee: gmcharlt at gmail.com
Reporter: pablo.bianchi at gmail.com
QA Contact: testopia at bugs.koha-community.org
bulkmarcimport.pl -d ("Delete EVERYTHING related to biblio in koha-DB before
import. Tables: biblio, biblioitems, items") use this code
if ($delete) {
if ($biblios){
print "deleting biblios\n";
$dbh->do("truncate biblio");
$dbh->do("truncate biblioitems");
$dbh->do("truncate items");
} else {
print "deleting authorities\n";
$dbh->do("truncate auth_header");
}
$dbh->do("truncate zebraqueue");
}
But, as Robin Sheat[1] point me this is a deprecated way. Now, with MySQL >~5.5
the way is just to:
DELETE FROM biblio;
And the constraints will propagate the delete to (ALMOST) all other tables.
[1] http://lists.katipo.co.nz/public/koha/2014-June/039701.html
Related bug: #12486.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list