Bug 18601: OAI/Sets.t mangles data due to truncate in ModOAISetsBiblios
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 15 May 2017 07:58:04 +0000 (09:58 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Jun 2017 19:18:59 +0000 (16:18 -0300)
commite0444e8600efbe06016ff857f23ea85893a93041
treee881835613ab7b18a5a3010b605e8f0ebe82c341
parent323cc1501fc91d67e8ecaa0a2cdf272f642d8e46
Bug 18601: OAI/Sets.t mangles data due to truncate in ModOAISetsBiblios

This patch replaces the TRUNCATE statement in ModOAISetsBiblios by a
DELETE statement. A truncate will cause an implicit commit and will
therefore commit the transaction started in the test script.

Also simplifying the module load in the test script.

Test plan:
Do not apply this patch and observe that biblio records are added to your
database by running t/db_dependent/OAI/Sets.t.
Apply this patch, run the test again and verify that it does no longer
add records to your biblio table.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/OAI/Sets.pm
t/db_dependent/OAI/Sets.t