2 messages in com.mysql.lists.bugsRe: error message misleading
FromSent OnAttachments
Monte Ohrt23 Oct 2002 08:24 
Sergei Golubchik23 Oct 2002 15:19 
Subject:Re: error message misleading
From:Sergei Golubchik (se@mysql.com)
Date:10/23/2002 03:19:59 PM
List:com.mysql.lists.bugs

Hi!

On Oct 23, Monte Ohrt wrote:

Hi,

I'm not sure if this is a bug or not, but this statement gives an error in 4.0.5, whereas in 3.x it did not complain:

How-To-Repeat:

CREATE TABLE user_group ( user_name varchar(250) NOT NULL default '', user_group varchar(250) NOT NULL default '', PRIMARY KEY (user_name,user_group) ) TYPE=MyISAM;

ERROR 1005: Can't create table './FOO/user_group.frm' (errno: 140)

I'm sure it has to do with putting a primary key on two varchar(250) columns. If I shorten the column definitions so the total key length is <= 255, all is well. It probably _should_ complain, but maybe the error could be a little more helpful? At first glance, it looks like a file permission problem.

At the second glance, it's different:

% perror 140 140 = Wrong create options

This situtation happens when key length just a little bit less than 501. Otherwise it either works, or issues an error "too long key".

Anyway, this is now fixed, and MyISAM can happily create 500 byte keys. Thank you for spotting this.

Regards, Sergei