Subject Re: [firebird-support] Re: "no current record for fetch operation" with inner join and SP
Author Arno Brinkman
Hi,

> > >> select *
> > >> from rdb$database
> > >> join test1(rdb$relation_id) on (1=1)
> > >>
> > >> and get the error reported in the subject line (Fb 1.5).
> > >>
> > >> Is this a known issue?
> >
> > A> Nando, I can't say is it bug or feature, but yes, it is known.
> Note
> > A> left join works.
> >
> > Is it logged somewhere? I couldn't find it on the tracker. Should I
> > log it there? Should I investigate whether developers think it's
> > something to be corrected or not?
>
> It was so long ago, perhaps always and perhaps because of age is'nt
> registered as bug. And I can't speak for developers :) Perhaps it is
> really subject for discussion in firebird-devel.

Indeed, it's a known problem.
I covered it also in my Optimizer sessions in Fulda. The optimizer handles
"unions", "SP's", "aggregate's" and "nested "rse's" first. This causes that
the SP is put before any table when a INNER JOIN is used. As you already
notice you can force another JOIN ORDER with a LEFT JOIN here.

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://80.126.130.81