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

Assert failure when concatenating strings with total size greater than 32K

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.6.1.0
    • None
    • SQL
    • Low
    • Repro attached
    • Deviation from standard

    Description

      When concatenating two strings whose total length exceeds the maximum length for a VARCHAR, an assert is triggered in the debug jars:

      ij> values length('0123456789.....' || '0123456789.....');
      ERROR XJ001: Java exception: 'ASSERT FAILED The maximum length 35000 for the result type VARCHAR can't be greater than it's maximum width of result's typeid32672: org.apache.derby.shared.common.sanity.AssertFailure'.

      With non-debug jars, the same query completes successfully:

      ij> values length('0123456789.....' || '0123456789.....');
      1
      -----------
      35000

      1 row selected

      I think this query is supposed to fail, also with non-debug jars, but in any even it shouldn't be raising assert failures.

      Attachments

        1. concat.sql
          34 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: