@@ -, +, @@ TRUNCATE - Make sure you havae a test database with some records and items - Run bulkmarcimport.pl with the -d switch - Observe the error described above - Apply this patch - Run bulkmarcimport.pl with the -d switch again - Observe the lack of an error - Verify that the newly imported records and items have biblionumber and itemnumbers starting with 1 --- misc/migration_tools/bulkmarcimport.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/misc/migration_tools/bulkmarcimport.pl +++ a/misc/migration_tools/bulkmarcimport.pl @@ -176,9 +176,12 @@ if ($fk_off) { if ($delete) { if ($biblios){ print "deleting biblios\n"; - $dbh->do("truncate biblio"); - $dbh->do("truncate biblioitems"); - $dbh->do("truncate items"); + $dbh->do("DELETE FROM biblio"); + $dbh->do("ALTER TABLE biblio AUTO_INCREMENT = 1"); + $dbh->do("DELETE FROM biblioitems"); + $dbh->do("ALTER TABLE biblioitems AUTO_INCREMENT = 1"); + $dbh->do("DELETE FROM items"); + $dbh->do("ALTER TABLE items AUTO_INCREMENT = 1"); } else { print "deleting authorities\n"; --