From 5f43cf868374db60836d2b372af444953fde3e31 Mon Sep 17 00:00:00 2001 From: skidder Date: Wed, 23 Jun 2004 16:40:19 +0000 Subject: [PATCH] Report PLANs for selectable procedures in correct order. This is a fix for regression which I introduced a few months ago and it was found by Vlad Horsun --- src/jrd/opt.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/jrd/opt.cpp b/src/jrd/opt.cpp index 4ae8c6793c..93a2b339a2 100644 --- a/src/jrd/opt.cpp +++ b/src/jrd/opt.cpp @@ -282,12 +282,10 @@ bool OPT_access_path(const jrd_req* request, SCHAR* begin = buffer; /* loop through all RSEs in the request, - and describe the rsb tree for that rsb; - go backwards because items were popped - off the stack backwards */ + and describe the rsb tree for that rsb */ SLONG i; - for (i = request->req_fors.getCount() - 1; i >= 0; i--) { + for (i = 0; i < request->req_fors.getCount(); i++) { RecordSource* rsb = request->req_fors[i]; if (rsb && !dump_rsb(request, rsb, &buffer, &buffer_length)) break; @@ -295,7 +293,7 @@ bool OPT_access_path(const jrd_req* request, *return_length = buffer - begin; - return (i < 0); + return (i >= request->req_fors.getCount()); }