Firebird Documentation IndexFirebird 2.0.6 Release NotesNew in Firebird 2.0 → Run-time Checking for Concatenation Overflow
Firebird Home Firebird Home Prev: UDFs Improved re NULL HandlingFirebird Documentation IndexUp: New in Firebird 2.0Next: Changes to Synchronisation Logic

Run-time Checking for Concatenation Overflow

D. Yemanov

Compile-time checking for concatenation overflow has been replaced by run-time checking.

From Firebird 1.0 onward, concatenation operations have been checked for the possibility that the resulting string might exceed the string length limit of 32,000 bytes, i.e. overflow. This check was performed during the statement prepare, using the declared operand sizes and would throw an error for an expressions such as:

  CAST('qwe' AS VARCHAR(30000)) || CAST('rty' AS VARCHAR(30000))
    

From Firebird 2.0 onward, this expression throws only a warning at prepare time and the overflow check is repeated at runtime, using the sizes of the actual operands. The result is that our example will be executed without errors being thrown. The isc_concat_overflow exception is now thrown only for actual overflows, thus bringing the behaviour of overflow detection for concatenation into line with that for arithmetic operations.

Prev: UDFs Improved re NULL HandlingFirebird Documentation IndexUp: New in Firebird 2.0Next: Changes to Synchronisation Logic
Firebird Documentation IndexFirebird 2.0.6 Release NotesNew in Firebird 2.0 → Run-time Checking for Concatenation Overflow