Subject Re: [firebird-support] What implementation restriction was exceeded exactly?
Author Kjell Rilbe
Den 2011-08-31 16:36 skrev Ann Harrison såhär:
> On Wed, Aug 31, 2011 at 9:19 AM, Kjell Rilbe <kjell.rilbe@...
> <mailto:kjell.rilbe%40datadia.se>> wrote:
>
> > I know the SQL below is somewhat silly, but ignoring that, why did it
> > give me this error:
> >
> > Error executing query: Dynamic SQL Error
> > SQL error code = -204
> > Implementation limit exceeded
> > block size exceeds implementation restriction
> >
> > The SQL is "only" about 7 kbyte and the "or-list" contains far fewer
> > than the 1499 items that's maximum for "in-lists". So what
> > implementation restriction was exceeded, exactly?
>
> As the error says, your query produces an intermediate compilation block
> that exceeds the size allowed by the internal block allocation code - 32K, I
> think. The specific block type is almost certainly a CSB, compiler scratch
> block. And, in response to your second question, there isn't a fixed
> number of conditions permitted - the types and sizes of the terms matter,
> and maybe also the lengths of the names.

Ah, I understand! Thanks! :-)

> The workaround for your particular query is to build up IN lists and OR them
> together.

Actually the solution is to split the underlying OCL query into smaller
blocks, which I've already done and it works fine. It just would have
been nice to have a crystal clear limit to put into my code that does
the split. Oh well, as long as it works and I know why...

Thanks a bunch Ann, as always!

Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64