Bug #76091 Sybase ASE migration fails to detect many field data types
Submitted: 2 Mar 2015 10:00 Modified: 4 Mar 2015 8:15
Reporter: Chris Keene Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:Workbench 6.2, 8.0 OS:Windows (Windows 7)
Assigned to: CPU Architecture:Any
Tags: sybase

[2 Mar 2015 10:00] Chris Keene
Description:
The migration process from Sybase to Mysql fails for most tables in our database because at least one field is incorrectly identified. The migration wizard seems to report different source data types at different stages.

All seems well through the wizard. Connections seem ok. the database structure is created successfully in MySQL. The problem comes at the actual migration of data, nearly all tables fail (but not all). 

The tables fail due to a type mismatch. 
eg from the logs 
ERROR: `prod_talis`.`ITEM_DESCRIPTION_TYPE`:Type mismatch fetching field 2 (should be char, was MYSQL_TYPE_STRING) 
ERROR: `prod_talis`.`ITEM_DESCRIPTION_TYPE`:Failed copying 666 rows 
`prod_talis`.`ITEM_QUERY`:Copying 19 columns of 27728 rows from table [prod_talis].[dbo].[ITEM_QUERY] 
ERROR: `prod_talis`.`ITEM_QUERY`:Type mismatch fetching field 1 (should be long, was MYSQL_TYPE_STRING) 
`prod_talis`.`ITEM_CHECK_IN`:Copying 17 columns of 147524 rows from table [prod_talis].[dbo].[ITEM_CHECK_IN] 
ERROR: `prod_talis`.`ITEM_CHECK_IN`:Type mismatch fetching field 1 (should be long, was MYSQL_TYPE_STRING) 
ERROR: `prod_talis`.`ITEM_QUERY`:Failed copying 27728 rows 

Looking at one field as an example: ITEM_DESCRIPTION_TYPE.SUB_TYPE (field 2 in that table) 

The actual Sybase type is tinyint. 

At the Source Migration stage we get the following warning 
WARNING: Sybase reverseEngineerTableColumns: Column datatype "TYPE" for column "SUB_TYPE" in table "dbo.ITEM_DESCRIPTION_TYPE" reverse engineered as VARCHAR(255) 

Oddly the 'Source Type' for SUB_TYPE is listed as VARCHAR(255) on the 'Manual editing' wizard screen. 

And finally at the migration stage it fails the whole table with 
ERROR: `prod_talis`.`ITEM_DESCRIPTION_TYPE`:Type mismatch fetching field 2 (should be char, was MYSQL_TYPE_STRING) 

Screenshots can be found here
http://sn.im/29qeaww 

This results in what I consider a fairly typical and standard sybase database failing to migrate the vast majority of tables. 

I'm using Workbench 6.2 on Windows 7. 
ODBC to connect to Sybase ASE 15. 
Mysql 5.5.1 

How to repeat:
Try migrating a Sybase ASE database using the above version of MySQL Workbench to MySQL.
[4 Mar 2015 8:15] Mike Lischke
Thanks for filing the bug report. Sybase ASE support is still under development in MySQL Workbench, but should work for many situations already. However, we need to investigate your specific case to find a solution.
[21 May 2020 12:14] MySQL Verification Team
Bug #99193 marked as duplicate of this one.