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.
Created attachment 159367 [details] [review] 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
Created attachment 166783 [details] [review] 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>
Created attachment 171830 [details] [review] 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>
The patch is from BibLibre but it's a bugfix that has been in the QA queue for 4 months. I hope it's okay that I QA it. Feel free to ask for another QA. QA notes: I wasn't sure so I checked but the ORDER BY is indeed applied to the whole resultset and not only the last select of the union (https://mariadb.com/kb/en/union/#order-by-and-limit)
Thanks Julian, I agree, all good for you're QA here. Shame it dropped through the queue and out of sight. :(
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
Backported to 24.05.x for upcoming 24.05.06
Pushed to 23.11.x for 23.11.11
Not backporting to 22.11 unless requested
No changes to the manual required.