Bug #71608 Mysql workbench migration wizard - incorrect for MS Sqlserver NVARCHAR
Submitted: 6 Feb 2014 11:43 Modified: 13 Mar 2014 19:55
Reporter: Kevin Evans Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:6.0.8/6.0.9 OS:Windows (Version 7)
Assigned to: CPU Architecture:Any
Tags: NVARCHAR

[6 Feb 2014 11:43] Kevin Evans
Description:
I have been trying to use the migration toolkit in mysql workbench V6 to generate a schema from my sql server database. I am finding that for columns defined as nvarchar in sql server the toolkit generates a varchar column of twice the length in mysql even though the corresponding mysql column is utf8.
 
e.g a sqlserver NVARCHAR(255) is generating a VARCHAR(510) column in mysql. As the mysql column is utf8 this should only have a length of 255 matching the sqlserver column. 

How to repeat:
Use migration wizard to generat script from MS Sqlserver table with NVARCHAR column.
[6 Feb 2014 14:47] MySQL Verification Team
Thank you for the bug report.
[4 Mar 2014 16:41] Milosz Bodzek
Posted by developer:
 
Fixed
[4 Mar 2014 16:44] Milosz Bodzek
Please try this patch.

Attachment: mssql_length_nvarchar.diff (text/x-patch), 867 bytes.

[12 Mar 2014 11:45] Kevin Evans
Hi Milosz,

I have applied the patch that you provided and I can confirm that the migration workbench is now generaring the correct length columns for NVARCHAR types.

Thanks

Kevin
[13 Mar 2014 19:55] 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, "nVarchar(n)" columns would
always migrate to a MySQL "VARCHAR(n)" column that was twice the size.

Thank you for the bug report.