Bug #6080 Defining int(N) where N > 255 gives an unintuitive error
Submitted: 14 Oct 2004 5:25 Modified: 14 Aug 2005 2:47
Reporter: Lachlan Mulcahy Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:All OS:Any (All)
Assigned to: Jim Winstead CPU Architecture:Any

[14 Oct 2004 5:25] Lachlan Mulcahy
Description:
When creating a table with int(N) where N > 255 the error returned is along the lines of:

ERROR 1074 (42000): Column length too big for column 'ip_ad' (max = 255); use BLOB instead

This is unintuitive since the N is referring to display-width of the column (apparently) and not to 
capacity/length.

How to repeat:
CREATE TABLE t1 (ip_ad int(499) NOT NULL DEFAULT 0) TYPE=MyISAM;

Suggested fix:
Provide a more intuitive error that does not _further_ mislead users into thinking that the N in 
int(N) refers to the capacity of the field.
[6 Aug 2005 0:22] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27949
[8 Aug 2005 19:11] Jim Winstead
Fixed in 5.0.12.
[14 Aug 2005 2:47] Paul DuBois
No change note needed.