Bug #13860 The ORACLE Field Type REAL is not mapped to any MYSQL type.
Submitted: 8 Oct 2005 0:31 Modified: 19 Oct 2005 12:41
Reporter: Kimba Buchanan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S2 (Serious)
Version:1.0 OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any

[8 Oct 2005 0:31] Kimba Buchanan
Description:
I am trying to migrate an ORACLE Schema to MYSQL... I get all of the tables and data except for two tables.  These Tables have some fields with the data type of REAL...  After the Migration tool gets to the Schema Creation step, these two tables are identified and the fields that are REAL have the type of (nil).  I have used the advanced option to manually edit these to DOUBLE and/or FLOAT and used the Apply Changes button, but the changes do not appeared to apply... I used the Recreate Objects button after appling the changes, but it returns to the
creation results page and repeats the previous steps with the same two table failing.

I have performed the above with both the ORACLE DEFAULT and GENERIC methods with no success...

I could use either a workaround or a way to modify a configuration file to allow for the real mapped type.

Also, I have opened the GRT Environment Settings and this also shows that there is not mapping for the REAL datatype in the db.simpledatatype.

How to repeat:
In Oracle, create table with a REAL data type.

use the migration tool kit to migrate the table to MYSQL...

Suggested fix:
AN XML file for each supported database which contain the datafield mappings for that database to mysql mapping with instructions on how to modify the xml to add new mappings.
[11 Oct 2005 18:12] Jorge del Conde
Thanks for your bug report.  I was able to reproduce this using Oracle 9
[19 Oct 2005 12:41] 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

Additional info:

This issue has now been fixed.

REAL is not an Oracle datatype. According to the Oracle documentation it is converted to NUMBER internally. Please see http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/sql_elements2a.htm

I did not realize that the column datatype still reports REAL when queried. Now REAL, DOUBLE PRECISION and FLOAT are migrated as expected.

Actually there is a datatype mapping GenericDatatypeMapping.xml in the ./xml directory. But it is only used for generic migration. To change the dedicated Oracle migration please change .\java\com\mysql\grt\modules\MigrationOracle.java or simply report the issues you find here.