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

Fixed the plan output (reversed order of view sub-elements) in HEAD (also broken by my yesterday's commit).

This commit is contained in:
dimitr 2009-12-10 15:03:56 +00:00
parent bfe3441b2a
commit 753f4d62d5

View File

@ -667,22 +667,33 @@ Firebird::string OPT_make_alias(thread_db* tdbb, const CompilerScratch* csb,
if (base_tail->csb_view || base_tail->csb_alias)
{
Firebird::ObjectsArray<Firebird::string> alias_list;
for (const CompilerScratch::csb_repeat* csb_tail = base_tail; ;
csb_tail = &csb->csb_rpt[csb_tail->csb_view_stream])
{
if (csb_tail->csb_alias)
{
alias += *csb_tail->csb_alias;
alias_list.push(*csb_tail->csb_alias);
}
else if (csb_tail->csb_relation)
{
alias += Firebird::string(csb_tail->csb_relation->rel_name.c_str());
alias_list.push(csb_tail->csb_relation->rel_name.c_str());
}
if (!csb_tail->csb_view)
break;
alias += ' ';
}
while (alias_list.getCount())
{
alias += alias_list.pop();
if (alias_list.getCount())
{
alias += ' ';
}
}
}
else if (base_tail->csb_relation)