From 846c3834b36922598cafbe438fd94201257a5f2d Mon Sep 17 00:00:00 2001 From: Kory Draughn Date: Wed, 27 Mar 2024 22:17:38 -0400 Subject: [PATCH] squash. add stop code for genquery2 msi next_row --- lib/core/include/irods/rodsErrorTable.h | 2 ++ server/re/src/msi_genquery2.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/include/irods/rodsErrorTable.h b/lib/core/include/irods/rodsErrorTable.h index b4a6a04516..040d0c6d18 100644 --- a/lib/core/include/irods/rodsErrorTable.h +++ b/lib/core/include/irods/rodsErrorTable.h @@ -318,6 +318,8 @@ NEW_ERROR(USER_INCOMPATIBLE_OPEN_FLAGS, -404000) NEW_ERROR(INTERMEDIATE_REPLICA_ACCESS, -405000) NEW_ERROR(LOCKED_DATA_OBJECT_ACCESS, -406000) NEW_ERROR(CHECK_VERIFICATION_RESULTS, -407000) +NEW_ERROR(GENQUERY2_END_OF_RESULTSET, -408000) + /** @} */ /* 500,000 to 800,000 - file driver error */ diff --git a/server/re/src/msi_genquery2.cpp b/server/re/src/msi_genquery2.cpp index e4af40a314..88b803b42f 100644 --- a/server/re/src/msi_genquery2.cpp +++ b/server/re/src/msi_genquery2.cpp @@ -110,7 +110,7 @@ auto msi_genquery2_next_row(MsParam* _handle, RuleExecInfo* _rei) -> int // We must return ERROR(stop_code, "") to trigger correct usage of msi_genquery2_next_row(). // Otherwise, the NREP can loop forever. Ultimately, this means we aren't allowed to return // CODE(stop_code) to signal there is no new row available. - return 1; + return GENQUERY2_END_OF_RESULTSET; } catch (const irods::exception& e) { log_msi::error("{}: {}", __func__, e.client_display_what());