Bug #71379 Migration Wizard fails from MSSQL Decimal to MySQL BigInt
Submitted: 14 Jan 2014 18:14 Modified: 13 Mar 2014 19:49
Reporter: Pablo Moleri Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:6.0.8.11354 OS:Windows
Assigned to: CPU Architecture:Any

[14 Jan 2014 18:14] Pablo Moleri
Description:
Migration Wizards fails migrating data from Microsoft SQL Server to MySQL when column source column is decimal(10.0) and target is BigInt(20).

Note that the MySQL schemma already exists, it isn't created by Migration Wizard.

How to repeat:
MSSQL 2008
Source table with a decimal(10.0) column
Configured as ODBC Source with SQL Server 6.00.6002.18005 controller

MySQL 5.5
Target table with a Bigint(20) column.

Data migration fails with:
ERROR:`MyCatalog`.`MyTable`:Type mismatch fetching field 1 (should be string, was MYSQL_TYPE_LONGLONG)
[20 Jan 2014 11:48] MySQL Verification Team
Thank you for the bug report. Please provide the create table SQL statement for MSSQL. I couldn't repeat with my own sample. Thanks.
[20 Jan 2014 13:04] Pablo Moleri
Hi, thanks for the quick reply.

Create table MSSQL:
CREATE TABLE [dbo].[DiarioOper](
	[DO_Sec] [decimal](10, 0) NOT NULL,
	[DO_Chr] [character](3)
PRIMARY KEY CLUSTERED ([DO_Sec] ASC)
) ON [PRIMARY]
GO

Insert Into DiarioOper Values (1, 'A')

Create table MySQL:
CREATE TABLE `diariooper` (
  `DO_Sec` bigint(20) NOT NULL,
  `DO_Chr` character(3),
  PRIMARY KEY (`DO_Sec`)
) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1;

Data Copy result:
- `Test`.`DiarioOper` has FAILED (0 of 1 rows copied)
[20 Jan 2014 16:02] Milosz Bodzek
confirm, i can repeat.
[14 Feb 2014 18:36] Milosz Bodzek
Posted by developer:
 
Fixed
[14 Feb 2014 18:39] Milosz Bodzek
Please try this file

Attachment: db_mssql_migration_grt.py (text/x-python), 23.59 KiB.

[13 Mar 2014 19:49] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.1.3 release, and here's the changelog entry:

When migrating from Microsoft SQL Server, "DECIMAL(n, n)" did not properly
migrate to "BIGINT(n)".

Thank you for the bug report.