Bug #93293 data migration failed for decimal columns from MSSQL to mysql
Submitted: 22 Nov 2018 14:42 Modified: 10 Dec 2018 22:26
Reporter: pascal ragot Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: Migration Severity:S2 (Serious)
Version:6.3 OS:Any
Assigned to: CPU Architecture:Any

[22 Nov 2018 14:42] pascal ragot
While migrating a table from MSSQL (SQL2012 or higher) to MySQL using the migration wizard, data migration failed with error of type:
`BUGMIGRSQL`.`MYTEST`:Copying 2 columns of 1 rows from table [BUGMIGRSQL].[dbo].[MYTEST]
15:40:59 [INF][      copytable]: Statement execution failed: Incorrect decimal value: '1234.5' for column 'mynumber' at row 1:

INSERT INTO `BUGMIGRSQL`.`MYTEST` (`myname`, `mynumber`) VALUES ('myfield','1234.5\0')

ERROR: `BUGMIGRSQL`.`MYTEST`:Inserting Data: Incorrect decimal value: '1234.5' for column 'mynumber' at row 1
ERROR: `BUGMIGRSQL`.`MYTEST`:Failed copying 1 rows

This issue occurs when a data in a decimal column is using the higher size declared.

How to repeat:
On MSSQL server, create a database containing a single table with a decimal column.
this may be done using such sql script on a MS sql server:
create database BUGMIGRSQL;
create table MYTEST (
myname varchar(255),
mynumber decimal (6,2)
insert into  MYTEST (myname, mynumber) values ('myfield', 1234.56);
select * from MYTEST ;

now using MYSQL workbench, launch the migration wizard
press the "start migration " button
in source RDBMS, select your MSSQL server using ODBC (native) method and set BUGMIGRSQL as database
in destination,  use MySQL 
select the schema you want to migrate and press next multiple times
onc emigration will start copying datas, you will encounter the error
[22 Nov 2018 15:14] Miguel Solorzano
Thank you for the bug report.
[10 Dec 2018 22:26] Christine Cole
Posted by developer:
Fixed as of the upcoming MySQL Workbench 8.0.14 release, and here's the changelog entry:

Valid decimal data within a Microsoft SQL Server table generated an error
when used with the MySQL Workbench Migration Wizard.

Thank you for the bug report.