Bug #84336 Escaping special characters like apostrophe during migration in Workbench
Submitted: 26 Dec 2016 7:34 Modified: 26 Dec 2016 9:11
Reporter: Ömer Özyıldız Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:6.3.8 OS:Windows (7 in Virtual Box)
Assigned to: CPU Architecture:Any
Tags: apostrophe, migration, ms sql server, special character, workbench

[26 Dec 2016 7:34] Ömer Özyıldız
Description:
Hello.
I am trying to migrate a database from MS SQL Server 2014 Express to MySQL 5.7 CE using Migration Wizard in Workbench. Some tables in that database has some fields including apostrophe('). Workbench creates db schema flawlessly and copies some of the data, but in several tables it gives error. I figured out apostrophe in value fields breaks the validity of SQL statement and needs to be escaped.

Here is some extra info:
* I am using MySQL 5.7.17 Community Ed.
* For connecting MS SQL, I used "ODBC Driver 11 for SQL Server(version 2014.120.2000.08)" driver. I tried "SQL Server" and "SQL Server Native Client 11.0" driver too, nothing changed.
* This SO Question is also about the same issue: http://stackoverflow.com/questions/40224006/sql-server-to-mysql-migration-using-mysql-work...

How to repeat:
1. Create a database in MS SQL Server.
2. Create a table in that that DB.
3. Insert a value to that table including the character " ' ". For example "CÔte D'Ivoire".
4. Open MySQL Workbench and use "Migration Wizard" to migrate that particular DB.
4.1.  Select Microsoft SQL Server as source db, and connect it with latest odbc drivers which provided by MS SQL Server.
4.2. Select MySQL db as target.
4.2 "Object Migration" should be fine.
4.3 Check "Online copy of table data to target RDBMS" option in "Data Migration" and try to migrate.
[26 Dec 2016 9:11] MySQL Verification Team
Thank you for the bug report. Duplicate of http://bugs.mysql.com/bug.php?id=83616.