Bug #12780 Missing default values
Submitted: 24 Aug 2005 9:02 Modified: 30 Aug 2005 23:15
Reporter: Sadao Hiratsuka (Basic Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S2 (Serious)
Version:1.0.14 OS:Windows (WindowsXP)
Assigned to: CPU Architecture:Any

[24 Aug 2005 9:02] Sadao Hiratsuka
Description:
Column's default values are not converted from Oracle to MySQL.

How to repeat:
I tested with Oracle 9.2.0.6 and MySQL 5.0.10.

-- Table definition in Oracle

create table test011_default (
col1 number default 100,
col2 varchar(20) default 'MySQL'
)
/
insert into test011_default values (default, default)
/
commit
/

-- Generated Creates.sql

CREATE TABLE `mi`.`test011_default` (
  `col1` DECIMAL(22, 0) NULL,
  `col2` VARCHAR(20) NULL
)
ENGINE = INNODB;

Suggested fix:
Creates.sql shuld have following statement.

CREATE TABLE `mi`.`test011_default` (
  `col1` DECIMAL(22, 0) DEFAULT 100 NULL,
  `col2` VARCHAR(20) DEFAULT "MySQL" NULL
)
ENGINE = INNODB;
[30 Aug 2005 20:47] Jorge del Conde
Thanks for your bug report.  I was able to reproduce this bug using 1.1.15
[30 Aug 2005 23:15] Michael G. Zinner
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
[12 Sep 2005 3:36] Sadao Hiratsuka
Won't fix?
It seems to be fixed in 1.0.18.