6 messages in com.mysql.lists.clusterRe: Problems with Unique Indexes| From | Sent On | Attachments |
|---|---|---|
| Doug Hunting | 21 Dec 2005 12:38 | |
| Alex Davies | 21 Dec 2005 13:48 | |
| Adam Dixon | 21 Dec 2005 14:21 | |
| Doug Hunting | 21 Dec 2005 14:28 | |
| Jonathan Miller | 21 Dec 2005 14:47 | |
| Stewart Smith | 22 Dec 2005 21:42 |
| Subject: | Re: Problems with Unique Indexes![]() |
|---|---|
| From: | Doug Hunting (loc...@comcast.net) |
| Date: | 12/21/2005 02:28:50 PM |
| List: | com.mysql.lists.cluster |
Alex Davies wrote:
From memory that limitation is hardcoded as a limit... although Jonas implies that it might be a bug @ http://forums.mysql.com/read.php?25,26852,27570
Alex On 21/12/05, Doug Hunting <loc...@comcast.net> wrote:
I continue to have a problem when creating UNIQUE KEY INDEXES....
I am using the following create syntax:
CREATE TABLE <cut>.xar_block_groups ( xar_id int(11) NOT NULL auto_increment, xar_name varchar(255) NOT NULL default '', xar_template varchar(255) NOT NULL default '', PRIMARY KEY (xar_id), UNIQUE KEY i_xar_block_groups (xar_name) )ENGINE=NDB; I have also tried: CREATE TABLE <cut>.xar_block_groups ( xar_id int(11) NOT NULL auto_increment, xar_name varchar(255) NOT NULL default '', xar_template varchar(255) NOT NULL default '', PRIMARY KEY (xar_id), UNIQUE KEY i_xar_block_groups *USING HASH* (xar_name) )ENGINE=NDB;
...and this is the error that I get: ERROR 1071 (42000): Specified key was too long; max key length is 255 bytes ERROR 1071 (42000): Specified key was too long; max key length is 255 bytes
config.ini: ******************************************************************************************** [NDBD DEFAULT] NoOfReplicas=2 DataMemory=180M IndexMemory=180M
<cut> MaxNoOfOrderedIndexes = 1024 MaxNoOfUniqueHashIndexes = 512 <cut> MaxNoOfOrderedIndexes = 1024 MaxNoOfUniqueHashIndexes = 512
I don't know where the 255 bytes comes from. I have not found it in the my.cnf nor in the output of /mysqladmin variables. /Please help!
-Doug Hunting
-- MySQL Cluster Mailing List For list archives: http://lists.mysql.com/cluster To unsubscribe: http://lists.mysql.com/cluster?unsub=al...@davz.net
-- Alex Davies // http://www.davz.net
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately by e-mail and delete this e-mail permanently.
Contact me - MSN: a_d...@hotmail.com SKYPE: alex.davies
I have been able to create the table by adding: ' DEFAULT CHARSET=latin1' and then immediately after the create statement, alter the table back to UTF8, but I worry that the index would not have gotten created properly after the change to the CHARSET for the table... Unfortunately, changing the database design is NOT an acceptable solution.
I want to stay with the MySQL Cluster, however we need to maintain the UTF8 charset as well as the varchar(255) column...
-Doug




