MySQL Forums
Forum List  »  NDB clusters

ERROR 1089 (HY000):
Posted by: Ahmed El Zein
Date: February 15, 2005 06:27AM

I was trying to create a table the other day on mysql cluster, like so:

CREATE TABLE test1 ( id bigint(20) unsigned NOT NULL auto_increment, fname varchar(32) NOT NULL default '', lname varchar(32) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY name_idx (fname(25),lname(25)) ) ENGINE=NDBCLUSTER;

this returns an error:

ERROR 1089 (HY000): Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys

This works fine without "ENGINE=NDBCLUSTER" so I know it is related to the new engine!! It also works if I leave "ENGINE=NDBCLUSTER" and remove "UNIQUE".

if I change (fname(25),lname(25)) to (fname(32),lname(32)) it works as well!!

I think that this is not right!! what if fname was 255 or something??

Can anyone help me understand why the index must be created from all of the column width?

Thanx in advance,
Ahmed

Options: ReplyQuote


Subject
Views
Written By
Posted
ERROR 1089 (HY000):
11704
February 15, 2005 06:27AM
4914
February 15, 2005 08:10PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.