Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-8111

Fix SQL generation for long schema names

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 5.5
    • Component/s: Core VCS
    • Environment:
      MySQL

      Description

      When using extremely long schema (or complex type) names, databases that have limits on their system name lengths (table names, constraint names, index names) may fail.

      For instance MySQL:

      Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: java.sql.SQLException. message: Error post creating table: ALTER TABLE `cmdist_initial_copy_external_participant_mailboxes` ADD INDEX `cmdist_initial_copy_external_participant_mailboxes_id_hierarchy_fk` (`id`), ADD CONSTRAINT `cmdist_initial_copy_external_participant_mailboxes_id_hierarchy_fk` FOREIGN KEY (`id`) REFERENCES `hierarchy` (`id`) ON DELETE CASCADE : Identifier name 'cmdist_initial_copy_external_participant_mailboxes_id_hierarchy_fk' is too long
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.createTables(JDBCMapper.java:224)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.createDatabase(JDBCMapper.java:142)
      	... 38 more
      Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException. message: Identifier name 'cmdist_initial_copy_external_participant_mailboxes_id_hierarchy_fk' is too long
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fguillaume Florent Guillaume
                Reporter:
                fguillaume Florent Guillaume
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: