Bug #96230 Migrating DECIMAL from MSSQL lost the last value
Submitted: 17 Jul 2019 9:58 Modified: 19 Nov 2019 21:39
Reporter: Pei Cheng Tsau Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:8.0.16 OS:Windows
Assigned to: CPU Architecture:Any
Tags: decimal, migration, MSSQL

[17 Jul 2019 9:58] Pei Cheng Tsau
Description:
Migrating DECIMAL from MSSQL lost the last value.

Data type migration is correct.
MSSQL DECIMAL(5,1)
MySQL DECIMAL(5,1)

Copy data type correspondence. (from debug log).
MSSQL decimal  (type=SQL_DECIMAL, len=5)
MySQL MYSQL_TYPE_STRING

Actual data.
MSSQL 1020.6
Copy data.
MySQL 1020.0

Actual copy SQL.
insert into ... (..., '1020.', ...);

But 996.8 is correct by SQL '996.8'.

How to repeat:
Migrate with MySQL Workbench, use DECIMAL for data type.

Suggested fix:
1. Correct migration data type correspondence.
2. SQL_DECIMAL is converted to data type MYSQL_TYPE_STRING length plus one.
[17 Jul 2019 13:49] MySQL Verification Team
Thank you for the bug report.
[19 Nov 2019 15:57] Miguel Tadeu Mota
Posted by developer:
 
commid id: 0445a619c6021a5441a9a1bc686cb0cf82072185
[19 Nov 2019 21:39] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.19 release, and here's the changelog entry:

An original SQL Server record (for example, 1020.6) was copied
inaccurately to the corresponding MySQL column (1020.0) when migrated
using the DECIMAL data type. Similarly, data migrated using the NUMERIC
type generated a type-conversion error. Now, both decimal and numeric
values are stored as DECIMAL types to fix the resolution of the decimal
value or to fix the type conversion.

Thank you for the bug report.