Bug #37385 Error creating fisical script

Submitted: 13 Jun 2008 8:11 Modified: 29 Jul 2008 16:00
Reporter: Leandro Vidal Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.22 OS:Windows (vista)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any
Tags: DEFAULT, fisical, script

[13 Jun 2008 8:11] Leandro Vidal
Description:
Hello. I have created a diagram and I have put a column as date type and not null. Well, I don't know why but when I generate the create script, this column is like date type not null default null. Obviously, when I send the script to mysql, it gives me an error.

So, why don't you avoid that a column could be as "not null default null"?

How to repeat:
I just only 

Suggested fix:
Try to avoid that a column could be as "not null default null"
[13 Jun 2008 8:14] Leandro Vidal
I have forgotten to show the sentence generated:

CREATE  TABLE IF NOT EXISTS `gestorweb`.`productos` (
  `idproducto` INT(255) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `idioma` VARCHAR(255) NOT NULL ,
  `fecha` DATE NOT NULL DEFAULT NULL ,
  `nombre` VARCHAR(255) NOT NULL DEFAULT NULL ,
  `precio` DECIMAL(10,2) NOT NULL DEFAULT NULL ,
  `entradilla` VARCHAR(255) NOT NULL DEFAULT NULL ,
  `texto` TEXT NOT NULL DEFAULT NULL ,
  `baja` ENUM('S','N') NULL DEFAULT 'N' ,
  PRIMARY KEY (`idproducto`, `idioma`) ,
  CONSTRAINT `fk_productos_idiomas`
    FOREIGN KEY (`idioma` )
    REFERENCES `gestorweb`.`idiomas` (`idioma` )
    ON DELETE SET NULL
    ON UPDATE CASCADE)
ENGINE = InnoDB;

All the columns that shows NOT NULL DEFAULT NULL are in the diagram as NOT NULL only.

Regards
[13 Jun 2008 14:12] MySQL Verification Team
Thank you for the bug report. Could yu please provide the model file attaching it here using the Files tab. Thanks in advance.
[18 Jun 2008 8:59] Leandro Vidal
Any solution?
[18 Jun 2008 12:38] MySQL Verification Team
Thank you for the feedback. Verified with the model provided.
[29 Jul 2008 10:38] Johannes Taxacher
fix will be incorporated in next release (5.0.24)
[29 Jul 2008 10:39] Johannes Taxacher
fix will be incorporated in next release (5.0.24)
[29 Jul 2008 16:00] Tony Bedford
An entry was added to the 5.0.24 changelog:

When using the Forward Engineer SQL CREATE Script, columns marked as NOT NULL were generated as NOT NULL DEFAULT NULL.
[3 Aug 2008 18:06] Sveta Smirnova
Bug #38081 was marked as duplicate of this one.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.063 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.