Bug #31985 Don't allow the specification of a length for MEDIUMBLOB, LONGBLOB
Submitted: 31 Oct 2007 13:03 Modified: 4 Feb 2008 20:07
Reporter: Ulf Wendel Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S4 (Feature request)
Version:1.0.6 Alpha OS:Windows
Assigned to: Johannes Taxacher CPU Architecture:Any

[31 Oct 2007 13:03] Ulf Wendel
Description:
Do not allow the specification of a length for column types that do not take any length, e.g. MEDIUMBLOB, LONGBLOB. Currently a length gets accepted and you can export invalid SQL.

Please note this is about WB 1.0.6 Alpha. 1.0.6 Alpha is newer than 1.1.10. You can download it from https://inside.mysql.com/wiki/MySQLWorkbenchAlphaReleases . Please note also the special and temporary handling of pre-beta bug reports.

How to repeat:
Create a table "table1" in WB:

id INT PRIMARY KEY
c_mediumblob_0 MEDIUMBLOB(0)
c_longblob_0 LONGBLOB(0)
c_longtext_0 LONGTEXT(0)

When you enter LONGTEXT(0) in the Datatype input file of the table editor columns type, it gets converted on the fly to LONGTEXT which is just great!!! This does not happen with the other data types, validation does not bail and you can make WB export the following CREATE SQL script which contains invalid SQL:

CREATE  TABLE IF NOT EXISTS `mydb`.`table1` (`id` INT  NOT NULL , `c_mediumblob_0` MEDIUMBLOB(0)  NULL , `c_longblob_0` LONGBLOB(0)  NULL , `c_longtext_0` LONGTEXT  NULL , PRIMARY KEY (`id`) ) ;
[8 Nov 2007 15:59] Andrii Nikitin
is not reproducible in rev. 2040 probably fixed as side effect
[9 Nov 2007 9:47] Andrii Nikitin
reproducible in rev.2054
will be covered by syntax check
[9 Nov 2007 9:47] Andrii Nikitin
reproducible in rev.2054
will be covered by syntax check
[4 Feb 2008 20:07] Johannes Taxacher
entering numeric-values isn't allowed anymore for datatypes that don't support this