Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-841

SQLUtil.fixConstraintName broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • JBossAS-4.0.5.GA
    • None
    • CMP service
    • None

    Description

      SourceForge Submitter: pilhuhn .
      SQLUtil.fixConstraintName() uses the max table name
      length to get the maximum length of a PK_constraint.
      Unfortunately, there are databases, that have different
      lenght for different things.
      E.g.

      The limit for table names in DB2 for Windows, OS/2 and
      Unix was lifted to 128 in
      v6. Column names can be 30 bytes long. Primary keys are
      still limited to
      18

      So fcName() would check for 128 bytes, even if a column
      can only be 30 chars in length.
      Even worse: pks can only be 18 chars in length...

      Possible solution:
      Add even more entries to standardjbosscmp-jdbc.xml that
      override the settings obtained from
      DatabaseMetaData.getColumnNameLength().
      This would be three optional elements
      -table-name-length
      -column-name-length
      -primarykey-name-length

      Are there other databases out, that are so broken?

      Attachments

        Activity

          People

            pilhuhn Heiko Rupp
            sourceforge-user SourceForge legacy user (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: