Bug #4117 Too many columns while creating a table
Submitted: 13 Jun 2004 1:48 Modified: 16 Jun 2004 14:08
Reporter: Partha Dutta
Status: To be fixed later
Category:Server: DDL Severity:S2 (Serious)
Version:4.1.2 OS:Sun Solaris (Solaris 2.8 64bit)
Assigned to: Sergey Gluhov Target Version:

[13 Jun 2004 1:48] Partha Dutta
Description:
I have a schema for a table that contains 1896 columns. This schema for the table  can be
created under version 4.0.20, but fails with the error "Too many columns" under version
4.1.2.

How to repeat:
Use the attached SQL to create the table under both versions. It will succeed with
4.0.20, but fail in 4.1.2

Suggested fix:
Why should a DDL break in the new version? This should be tested and fixed ASAP!
[13 Jun 2004 1:50] Partha Dutta
schema for table with many columns

Attachment: calcrtz.sql (text/x-sql), 81.82 KiB.

[16 Jun 2004 14:07] Sergei Golubchik
Your DDL doesn't work, because in 4.1 we allocate two bytes to store field's length,
instead of one. Thus you go above max length a row metadata can be in an frm file.

This cannot be fixed ASAP, but only when we introduce new, more flexible frm format that
does not have arbitrary limits (our current one is 20 years old already).

Unfortunately it cannot happen before 5.0
[23 Mar 2006 23:35] Mark Van De Vyver
Hi, 
I'm also running into this limitation.

I'm using MySQL v4.1.12 on linux and 5.0.18-nt

A workaorund is to restructure the tables.
Is there any other way around this limit?