Bug #5491 Adding (null) after datatype without length attribute
Submitted: 9 Sep 2004 14:05 Modified: 1 Oct 2004 14:50
Reporter: Radisa NOT_FOUND Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.0.12 OS:Linux (Linux)
Assigned to: Alfredo Kojima CPU Architecture:Any

[9 Sep 2004 14:05] Radisa NOT_FOUND
Description:
When I use the tool to add new field into table, if data type belongs to types without the length 
attribute, the created SQL statement for table altering is wrong, i.e. if I try to add DATE field the 
following SQL is created: 
ALTER TABLE `testbase`.`test` ADD COLUMN `test` DATE(null); 
 
If I try to execute it the error occures. 
 
I suppose this is a bug, if it is not then please tell me how can I add DATE or DATETIME field using 
this tool. 
 
Thanks. 

How to repeat:
try simple to add new field into table (or to alter existing field), use i.e. DATE datatype. 

Suggested fix:
don't append (null) at the end of datatype to all datatypes
[1 Oct 2004 14:50] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html