From bf1ebfc0929085930bda8bbb0c16b8ea51b9e32f Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Mon, 21 Feb 2022 16:07:00 +0200 Subject: [PATCH] Bug 30143: OAI-PMH: Fix SQL query used to fetch deleted records MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The query was missing the "ORDER BY" and "LIMIT" clauses, which could make retrieve a wrong set of records. Signed-off-by: Joonas Kylmälä Signed-off-by: Marcel de Rooy Signed-off-by: Fridolin Somers --- Koha/OAI/Server/ListBase.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/OAI/Server/ListBase.pm b/Koha/OAI/Server/ListBase.pm index 4f1092d146..283f1b3334 100644 --- a/Koha/OAI/Server/ListBase.pm +++ b/Koha/OAI/Server/ListBase.pm @@ -116,7 +116,7 @@ sub GetRecords { $sql = " SELECT biblionumber FROM $table main - WHERE $where + WHERE $where $order_limit "; $ts_sql = "SELECT max(timestamp) FROM $table WHERE biblionumber = ?"; -- 2.39.5