Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-197

Grouper db initialization fails due to MySQL max key length issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 1.4.0
    • 1.4.0
    • API
    • None
    • MySQL 5.0 on Mac OS X

    Description

      The Mac OS X (and maybe others) implementation of MySQL does not support key lengths greater than 1000 (or 333 for the utf8 charset).

      The workaround is to manually change the length of the column in the generated ddl.

      This issue appears to be well known and may be fixed in later version of MySQL.

      When using Grouper 1.4.0 RC1 and mysql 5.0 and attempting to
      initialize via gsh -registry -check, I receive an error : "Specified key was too
      long; max key length is 1000 bytes".

      mysql> CREATE INDEX attribute_field_value_idx ON grouper_attributes
      (field_id, value);
      ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

      mysql> describe grouper_attributes;

      value varchar(1024) NO   NULL  

      mysql> status;
      --------------
      ./mysql5 Ver 14.12 Distrib 5.0.67, for apple-darwin9.5.0 (i686) using
      EditLine wrapper

      Connection id: 23
      Current database: grouper
      Current user: root@localhost
      SSL: Not in use
      Current pager: stdout
      Using outfile: ''
      Using delimiter: ;
      Server version: 5.0.67 Source distribution
      Protocol version: 10
      Connection: Localhost via UNIX socket
      Server characterset: latin1
      Db characterset: latin1
      Client characterset: latin1
      Conn. characterset: latin1

      grouper.hibernate.properties :

      hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
      hibernate.connection.driver_class = com.mysql.jdbc.Driver
      hibernate.connection.url = jdbc:mysql://127.0.0.1:3306/grouper

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            tom.zeller@at.internet2.edu Tom Zeller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: