Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] newbie help with mysql, please

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] newbie help with mysql, please


Chronological Thread 
  • From: "Tom Zeller" <>
  • To: "Chris Hyzer" <>
  • Cc: "Grouper Users Mailing List" <>
  • Subject: Re: [grouper-users] newbie help with mysql, please
  • Date: Fri, 12 Dec 2008 10:22:24 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=OdeOVaux8BSwZ1lixjZABOtKtqPzgLNzg+FDXJeMEVKXGkUSGGtTP8wxuy5it2+Q4X SdKq5ePYWstVVp+6/4HkjzhdZhRTrOydNJxjjkPlh1HCxZyiBW9sf79a64mtU2ENCcql uuzRyJFIAtFPZmvWIU0kXE+KE0RjXrN4EeXys=

Thanks, works, I'll close the jira I created yesterday :)

On Fri, Dec 12, 2008 at 1:38 AM, Chris Hyzer <> wrote:

Ok, I looked at the Grouper DDL code, and it is not hard to have this type of exception for mysql.  So I went ahead and put a fix in for this.

 

If mysql, I put the index on values at the first 333 chars.  If not mysql, it does what it used to do.  No problem. It works for me on mysql and oracle.

If you want to try it out, that would be good (Grouper HEAD).

 

Regards,

Chris

 

From: Chris Hyzer [mailto:]
Sent: Tuesday, December 09, 2008 3:38 PM
To: Tom Zeller


Cc: Grouper Users Mailing List
Subject: RE: [grouper-users] newbie help with mysql, please

 

> Does ddlutils check the charset ? max=333 for utf8 and max=1000 for latin1 AFAIK

 

 

No, but I think for this index 50 is fine (since the first 50 chars generally gives you the value), and its not a unique index… J  so 333 should be good for all too.

 

Regards,

Chris

 

From: [mailto:] On Behalf Of Tom Zeller
Sent: Tuesday, December 09, 2008 3:27 PM
To: Chris Hyzer
Cc: Grouper Users Mailing List
Subject: Re: [grouper-users] newbie help with mysql, please

 

On Tue, Dec 9, 2008 at 2:17 PM, Chris Hyzer <> wrote:

That's not good.  My mysql works fine, but I think it automatically tells the index to only use the first part of the col.  i.e. try this and see if it works:

CREATE INDEX attribute_field_value_idx ON grouper_attributes (field_id, value(767));

http://dev.mysql.com/doc/refman/5.0/en/create-index.html

 

Yes, works.

 


I only have 5.0.45, but it is windows...

I wonder if we should change ddlutils to account for this...

 

Does ddlutils check the charset ? max=333 for utf8 and max=1000 for latin1 AFAIK

 



Regards,
Chris



> -----Original Message-----
> From: [mailto:] On Behalf Of Tom
> Zeller
> Sent: Tuesday, December 09, 2008 2:39 PM
> To: Grouper Users Mailing List
> Subject: [grouper-users] newbie help with mysql, please
>
> When using Grouper 1.4.0 RC1 and mysql 5.0 and attempting to
> initialize via gsh -registry -check I receive "Specified key was too
> long; max key length is 1000 bytes".
>
> Help ? (I'm not using the utf8 charset.)
>
> Hopefully it's operator error. I don't have much experience with mysql.
>
> Thanks,
> TomZ
>
>
> 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;
> +--------------------------+---------------+------+-----+---------+----
> ---+
> | Field                    | Type          | Null | Key | Default |
> Extra |
> +--------------------------+---------------+------+-----+---------+----
> ---+
> | id                       | varchar(128)  | NO   | PRI | NULL    |
> |
> | group_id                 | varchar(128)  | NO   | MUL | NULL    |
> |
> | field_id                 | varchar(128)  | NO   |     | NULL    |
> |
> | value                    | varchar(1024) | NO   |     | NULL    |
> |
> | hibernate_version_number | bigint(20)    | YES  |     | NULL    |
> |
> +--------------------------+---------------+------+-----+---------+----
> ---+
> 5 rows in set (0.00 sec)
>
> 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

 





Archive powered by MHonArc 2.6.16.

Top of Page