Description:
I used the Migration Toolkit to migrate the database from Oracle to MySQL.
The range of Number type in Oracle is different from that of Decimal type in MySQL.
So Migration Toolkit rounds and converts the Number type.
Then Migration toolkit suppresses the warnings when number type is rounded.
How to repeat:
Create the table in Oracle as follow.
--------------------------------------------------------------------
create table bug001_number (
col0 number(1,0),
col1 number(38,30) default 99999999.999999999999999999999999999999,
col2 number(38,31) default 9999999.9999999999999999999999999999999
);
commit;
--------------------------------------------------------------------
Convert the table using Migration Toolkit.
MySQL creates the such table.
-------------------------------------------------------------------------
mysql> show create table bug001_number\G
*************************** 1. row ***************************
Table: bug001_number
Create Table: CREATE TABLE `bug001_number` (
`col0` int(1) default NULL,
`col1` decimal(38,30) default '99999999.999999999999999999999999999999',
`col2` decimal(38,30) default '10000000.000000000000000000000000000000'
) ENGINE=InnoDB DEFAULT CHARSET=cp932
1 row in set (0.00 sec)
-------------------------------------------------------------------------
The col2 is rounded.
And default values is rounded too.
But I can't find the error or warnings in the log.
--------------------------------------------------------------------------------
-- MySQL Migration Toolkit Report --
-- --
-- Title: Summary Of The Migration Process --
-- Date: 2007-03-30 17:49 --
--------------------------------------------------------------------------------
1. Schema Migration
-------------------
Number of migrated schemata: 1
Schema Name: mi
- Tables: 1
- Views: 0
- Routines: 0
- Routine Groups: 0
- Synonyms: 0
- Structured Types: 0
- Sequences: 0
Details:
- Tables
`mi`.`bug001_number`
--------------------
- Views
- Routines
- Routine Groups
- Synonyms
- Structured Types
- Sequences
2. Data Bulk Transfer
---------------------
`mi`.`bug001_number`
--------------------
1 row(s) transfered.
End of report.
--------------------------------------------------------------------------------
Suggested fix:
Avoiding the data lost and unexpected data change, Migration Toolkit should warn the rounding.
Description: I used the Migration Toolkit to migrate the database from Oracle to MySQL. The range of Number type in Oracle is different from that of Decimal type in MySQL. So Migration Toolkit rounds and converts the Number type. Then Migration toolkit suppresses the warnings when number type is rounded. How to repeat: Create the table in Oracle as follow. -------------------------------------------------------------------- create table bug001_number ( col0 number(1,0), col1 number(38,30) default 99999999.999999999999999999999999999999, col2 number(38,31) default 9999999.9999999999999999999999999999999 ); commit; -------------------------------------------------------------------- Convert the table using Migration Toolkit. MySQL creates the such table. ------------------------------------------------------------------------- mysql> show create table bug001_number\G *************************** 1. row *************************** Table: bug001_number Create Table: CREATE TABLE `bug001_number` ( `col0` int(1) default NULL, `col1` decimal(38,30) default '99999999.999999999999999999999999999999', `col2` decimal(38,30) default '10000000.000000000000000000000000000000' ) ENGINE=InnoDB DEFAULT CHARSET=cp932 1 row in set (0.00 sec) ------------------------------------------------------------------------- The col2 is rounded. And default values is rounded too. But I can't find the error or warnings in the log. -------------------------------------------------------------------------------- -- MySQL Migration Toolkit Report -- -- -- -- Title: Summary Of The Migration Process -- -- Date: 2007-03-30 17:49 -- -------------------------------------------------------------------------------- 1. Schema Migration ------------------- Number of migrated schemata: 1 Schema Name: mi - Tables: 1 - Views: 0 - Routines: 0 - Routine Groups: 0 - Synonyms: 0 - Structured Types: 0 - Sequences: 0 Details: - Tables `mi`.`bug001_number` -------------------- - Views - Routines - Routine Groups - Synonyms - Structured Types - Sequences 2. Data Bulk Transfer --------------------- `mi`.`bug001_number` -------------------- 1 row(s) transfered. End of report. -------------------------------------------------------------------------------- Suggested fix: Avoiding the data lost and unexpected data change, Migration Toolkit should warn the rounding.