Bug #13940 ERwin generation bugs
Submitted: 11 Oct 2005 22:29 Modified: 14 Dec 2010 8:57
Reporter: Serghey Parhomenko Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.11 OS:Windows (Windows XP SP2 Pro VL En :))
Assigned to: Georg Richter CPU Architecture:Any

[11 Oct 2005 22:29] Serghey Parhomenko
Description:
I used MySQL database with AllFusion ERwin Data Modeler, which, like it was said in manual, is tested for compatibility with MyODBC. But: when using ERwin Forward Engineer tool (allows to generate&execute SQL code for designed database), following elements were generated incorrectly:
- NOT NULL flag;
- Comments for tables and columns.
In short, this elements were not included in ERwin generated code, possibly because when connecting to MyODBC driver, ERwin incorrectly recognizes MySQL's possibilities (ERwin believes MySQL does not support NOT NULL flag and comments) - copied from ERwin help: "ERwin queries the database to determine the datatypes and physical properties it supports and displays them in the ERwin dialogs."
Software versions:
AllFusion ERwin Data Modeler 4.1.4.3907 (SP1)
MySQL 4.1.14
MyODBC 3.51.11

Please help me to find a solution for this case... I believe it is
MyODBC driver fault.

How to repeat:
- Install MySQL
- Install MyODBC
- Create MySQL database and MyODBC User DSN for this database
- Create ERwin physical model, selecting ODBC/Generic 3.0 as target database
- In connection window, enter root login\password and selected USer DSN early created
- Create in ERwin a table and a column in it. Set the "NOT NULL" flag, enter some comments for the table and the column
- ERwin: Tools->Forward Engineer->Generate.
- Check in MySQL (I was checking with MySQL-Front): the table&column were created, but comments are empty and the "NULL allowed" flag is ON, which is incorrect.

Suggested fix:
If it is MyODBC fault, it would be great to fix it's behaviour for correctly explaining ERwin MySQL capabilities.
[11 Oct 2005 23:00] Serghey Parhomenko
Also: not all datatypes are available in ERwin. I didn't found boolean, datetime, year, many text types and some others.
[12 Oct 2005 2:06] Jorge del Conde
I was able to reproduce this problem with Erwin 4.1.4
[27 Jul 2007 23:15] Jim Winstead
This should get re-verified with a current driver and version of ERwin. A free trial of ERwin can be downloaded from CA's website.

http://www.ca.com/smb/collateral.aspx?cid=72121&cct=19506
[27 Aug 2007 13:53] Tonci Grgin
Re-verifying.
[8 Feb 2008 10:29] Tonci Grgin
Even Erwin installation expires after some time so I'm unable to install it at all... Very weird behavior, never seen anything like this. Plus, I spent several hours installing/reinstalling since only after installation one is notified that Erwin will not start... Weird. Asking Miguel to help.
[16 Feb 2008 21:07] Serghey Parhomenko
The latest version of Erwin (7.2.5) tells that MySQL support (via the ODBC driver) was added (I don't know what it means, seems MySQL was supported via ODBC even in previous releases).
[14 Dec 2010 8:54] Bogdan Degtyariov
ERwin 7.3 generated the following statements:

CREATE TABLE E_1
(
	id                   INTEGER NOT NULL,
	txt                  VARCHAR(128) NOT NULL
);

ALTER TABLE E_1
ADD PRIMARY KEY (id);
[14 Dec 2010 8:57] Bogdan Degtyariov
If the bug ever existed, it has been fixed in 3.51.27. Here is the output from mysql command line:

mysql> show create table test_db.e_1\G
*************************** 1. row ***************************
       Table: e_1
Create Table: CREATE TABLE `e_1` (
  `id` int(11) NOT NULL,
  `txt` varchar(128) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

Closing the current report.