aports/testing/duckdb/fix-oob-array-access.patch
2026-03-16 19:07:32 +00:00

15 lines
596 B
Diff

diff --git a/src/execution/operator/join/physical_iejoin.cpp b/src/execution/operator/join/physical_iejoin.cpp
index fd392f3b9d..ecb89363ad 100644
--- a/src/execution/operator/join/physical_iejoin.cpp
+++ b/src/execution/operator/join/physical_iejoin.cpp
@@ -1367,6 +1367,9 @@ void IEJoinGlobalSourceState::Initialize() {
bool IEJoinGlobalSourceState::TryPrepareNextStage() {
// Inside lock
+ if (stage == IEJoinSourceStage::DONE) {
+ return true;
+ }
const auto stage_count = GetStageCount(stage);
const auto stage_next = GetStageNext(stage).load();
if (stage_next >= stage_count) {