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

Casting to a CLOB value does not truncate.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.1.2.1
    • 10.2.1.6
    • SQL
    • None

    Description

      ij> values cast(cast ('123456' as varchar(5)) as varchar(10));
      1
      ----------
      12345

      1 row selected
      ij> values cast(cast ('123456' as clob(5)) as varchar(10));
      1
      ----------
      123456

      I think caused by CLOB not returning true for TypeId.variableLength() not returning true for CLOB.
      Comments in code indicate some confusion, will add comments indicating the method is for types where
      the length is application defined. Will also remove XML as a variable type.

      Attachments

        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: