COALESCE + concatenation + dynamic parameter = exception
--------------------------------------------------------

                 Key: CORE-4777
                 URL: http://tracker.firebirdsql.org/browse/CORE-4777
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 2.5.4, 2.5.2
         Environment: WinXP, Win8
            Reporter: Andrew G. Khodotov


There are "Arithmetic overflow or division by zero has occurred. arithmetic 
exception, numeric overflow, or string truncation. string right truncation." 
raised on three conditions are meet:
1) COALESCE
2) String concatenation ("||")
3) Dynamic parameter (":param" or "?param").
E.g.:

SELECT COALESCE ( :param || 'stringConstant' , 'strNULL' )
  FROM RDB$Database

This query can be prepared, but raises the exception on execute.with any 
not-NULL not-empty value of "param" parameter.
Equivalent construction "CASE WHEN..." works properly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to