8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 03:23:04 +01:00

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

This commit is contained in:
skidder 2004-06-23 16:40:19 +00:00
parent 7cb60fbc5a
commit 5f43cf8683

View File

@ -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());
}