Bug 35442: Script migration_tools/build_oai_sets.pl add ORDER BY

Script migration_tools/build_oai_sets.pl is missing ORDER BY
biblionumber.
This is a problem when using OFFSET and LIMIT, the results may be
differenly orderder between two calls of this script.

Test plan :
1) Create a OAI SET with all records
2) Run migration_tools/build_oai_sets.pl with the first half of records
3) Run migration_tools/build_oai_sets.pl with the second half of records
4) Check all records are in the OAI set

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Fridolin Somers 2023-11-29 09:53:03 -10:00 committed by Martin Renvoize
parent 6c04f19636
commit 996c9d9fdc
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 0 deletions

View File

@ -88,6 +88,7 @@ my $query = qq{
FROM deletedbiblio_metadata
WHERE format='marcxml'
AND `schema` = ?
ORDER BY biblionumber ASC
};
if($length) {
$query .= "LIMIT $length";