Hi,

I have a problem when creating a table:


CREATE TABLE test (
    test_key varchar(255) NOT NULL default '',
    test_value text NOT NULL,
    PRIMARY KEY (test_key) ) TYPE=MYISAM;

It then report error:

mySQL Error: Specified key was too long. Max key length is 500

Why the varchar exceeded 500?
I have a "set-variable    = default-character-set=utf8" in my.cnf,  maybe
this is the cause of error?
And is there way to increase this 500 value?  Or I must use InnoDB then?

Mysql 4.1.1, RedHat 9

Thanks.

Francis Mak

Reply via email to