Bug #14953 ERROR 1005 (HY000) at line 20: Can't create table '.\db\lcomp.frm' (errno:
Submitted: 15 Nov 2005 16:22 Modified: 16 Jan 2006 8:58
Reporter: hello world Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:Windows (WinXp pro)
Assigned to: CPU Architecture:Any

[15 Nov 2005 16:22] hello world
Description:
useing 4.1.9 version 
- mysqldump all data

installed 5.0 version , uninstall 4.1.9
- recovering data 
- some tables 
ERROR 1005 (HY000) at line 20: Can't create table '.\borakdb\lcomp.frm' (errno: 121)

- copy the previous MySQL Server 4.1\data\db to MySQL Server 5.0\data\db 

mysql> show tables;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
ERROR:
Can't connect to the server

mysql>

How to repeat:
- install 4.1.9 
- install 5.0
- uninstall 4.1.9
- recover useing mysql db < files of 4.1.9
- or
- copy and past MySQL Server 4.1\data\db to MySQL Server 5.0\data\db

same tables comes but some tables doesnt and make the server down.

Suggested fix:
no idea
[15 Nov 2005 16:51] Valeriy Kravchuk
Thank you for a problem report. Please, indicate the exact version of 5.0 you installed. 

Is there anything in the error log when you get this message about inability to create table? Can it be so that you just have no disk space left? Check, please.

Is there something in common among problematic tables (like lcomp)? DECIMAL types used, specific storage engine etc?

You my.ini file content from 5.0 installation directory may be useful too.
[15 Nov 2005 18:21] Heikki Tuuri
Hi!

If you are using InnoDB tables, error 121 probably means that you already have the table existing inside InnoDB, but you do not have the .frm file.

From the .err log you can find a more detailed explanation of the problem.

Regards,

Heikki
[9 Dec 2005 16:59] Shawn Holyoak
I have the identical error except that I receive errno 139 instead of 121.  I've checked disk space and have over 30 GB available.  My .err file doesn't show anything regarding this error. My SQL text is:

create table if not exists dcadError (errorText varchar(1000) not null, index errorIndex (errorText));

The full error text I receive is: ERROR 1005 (HY000): Can't create table '.\corral_sync\dcaderror.frm' (errno: 139)

I'm also using Win XP pro SP2, MySQL version 5.0.16-nt.  I upgraded from 4.0 a long time ago using 5.0.13, had the problem with that installation, and just today upgraded to 5.0.16 to see if that would resolve the issue and it did not.

Interestingly, if I drop the index errorIndex (errorText) clause, the table gets created.  If I then use SQL text:

alter table dcadError add index errorIndex(errorText);

I receive the error:
ERROR 1005 (HY000): Can't create table '.\corral_sync\#sql-7f4_5.frm' (errno: 139)

Hope this will help.
[16 Dec 2005 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[16 Dec 2005 8:58] Valeriy Kravchuk
Original reporter:

Please, aswer the questions I asked you or simply close this bug report, if you already fixed the problem somehow. 

Shawn:

You case is different. Please, look:

Your MySQL connection id is 1 to server version: 5.0.15-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test;
Database changed
mysql> create table if not exists dcadError (errorText varchar(1000) not null, index
    -> errorIndex (errorText));
ERROR 1005 (HY000): Can't create table '.\test\dcaderror.frm' (errno: 139)
mysql> exit
Bye

C:\Documents and Settings\openxs>perror 139
MySQL error code 139: Too big row

The problem is that for InnoDB tables maximum indexed columns total size if limited to 767 bytes. Read http://dev.mysql.com/doc/refman/5.0/en/indexes.html for the details:

"Prefixes can be up to 1000 bytes long (767 bytes for InnoDB tables). Note that prefix limits are measured in bytes, whereas the prefix length in CREATE TABLE statements is interpreted as number of characters."
[17 Jan 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".