Subject Re: [ib-support] Re: Implementation limit exceeded
Author Paul Reeves
On Mon, 29 Apr 2002 17:41:07 +0200, lele@... wrote:
> In few words (I did not write it myself): say an object is composed
> by "A1-A3-B2", this SP accepts a coding like that and expand it
> into the actual tables. It's recursive, since the coding may refer
> to a subobject...
> That said, I cannot see it "corrupting" the DB in way that prevents
> the restore...

"block size exceeds implementation restriction" is an error that is raised under very few circumstances. The most likely cause is due to the engine evaluating a string concatenation expression and deciding that the possible size exceeds the MAX_COLUMN_SIZE. Another cause is when the arguments to a SUBSTR expression are detected to be out of range (again, exceeding MAX_COLUMN_SIZE).

You have string concatenations and substring expressions in abundance in this stored procedure. It is likely that when the engine is testing for the size of each string concatenation that it is getting confused by the possible length of the substrings in the expression.

Try casting the substring expressions to the required length. That may help the test for string concatenation length to succeed. Alternatively, break out the substring evaluations into temporary variables and do the concatenation of the temporary variables as a separate statement.

Paul Reeves
Supporting users of Firebird and InterBase