Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2809

Expressions with a parameter can be assigned the incorrect type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.3.1.4
    • 10.3.1.4, 10.4.1.3
    • SQL
    • None

    Description

      Some unary operator nodes with a parameter can be assigned incorrect types during bind time, for example SQRT can become a BOOLEAN expression.

      This statement compiles successfully when it should be rejected as SQRT() is not a boolean function.

      ij> values case when sqrt then 3 else 4 end;
      ERROR 07000: At least one parameter to the current statement is uninitialized.

      When a constant is used the correct binding happens.

      ij> values case when sqrt(9.0) then 3 else 4 end;
      ERROR 42X88: A conditional has a non-Boolean operand. The operand of a conditional must evaluate to TRUE, FALSE, or UNKNOWN.

      Attachments

        Issue Links

          Activity

            People

              djd Daniel John Debrunner
              djd Daniel John Debrunner
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: