[Koha-bugs] [Bug 12488] Make bulkmarcimport.pl -d use DELETE instead of TRUNCATE
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Feb 15 10:16:49 CET 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12488
Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #84963|0 |1
is obsolete| |
--- Comment #16 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 85148
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85148&action=edit
Bug 12488: Make bulkmarcimport.pl -d use DELETE instead of TRUNCATE
On MySQL >= 5.5 bulkmarcimport.pl with the -d (delete) switch gives
an error like "Cannot truncate a table referenced in a foreign
key constraint". This patch proposes to replace the offending
TRUNCATE with DELETE. Auto incerement counters are reset to 1 to
preserve the functionality from TRUNCATE.
To test:
- 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
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list