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

SimpleStringOperatorNode in it's bindExpression method generates a character string CAST if required but does not set the correct collation.

    XMLWordPrintableJSON

Details

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

    Description

      Following query should run into error if run in a territory based database
      SELECT TABLENAME FROM SYS.SYSTABLES WHERE UPPER(CURRENT_DATE) = TABLENAME;

      When a CAST node is generated on top of CURRENT_DATE to create a character string type, we do not set the collation of that character string type and hence it always ends up getting the default which is collation derivation IMPLICIT and collation type UCS_BASIC. That does not sound right.

      There might be other places where we generate CAST node to create a character string type. We should check if the collation is set correctly for them.

      Attachments

        1. derby-2910_diff.txt
          7 kB
          Katherine Marsden
        2. derby-2910_diff.txt
          7 kB
          Katherine Marsden
        3. derby-2910_stat.txt
          0.4 kB
          Katherine Marsden
        4. derby-2910_stat.txt
          0.4 kB
          Katherine Marsden

        Issue Links

          Activity

            People

              kmarsden Katherine Marsden
              mamtas Mamta A. Satoor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: