Bug #11209 Migration Toolkit doesn't handle \ (backslash) in text data
Submitted: 9 Jun 2005 15:05 Modified: 30 Aug 2005 1:09
Reporter: Niklas Johansson Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S1 (Critical)
Version:1.0.7 OS:Windows (Windows 2000)
Assigned to: Michael G. Zinner CPU Architecture:Any

[9 Jun 2005 15:05] Niklas Johansson
Description:
The Migration toolkit dosn't handle text data with backslashes.

Configuration:
Oracle 9i (9.2.0.5)
MySQL 5.0.6
Migation Toolkit 1.0.7

How to repeat:
Create the following table in an Oracle database:
CREATE TABLE TEST ( 
  TEXT  VARCHAR2 (50) ); 

Add a row with a backslash

INSERT INTO test(text) VALUES ('trouble \')
commit;

Try to migrate this table to a MySQL database. There will be an error in the Message Log during the Bulk Transfer saying:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"trouble \")' at line 2"

Suggested fix:
The SQL generated for inserting text data should 'escape' backslashes with an extra backslash.
My guess is that today the generated SQL will be INSERT INTO test(text) VALUES ("trouble \") for the example above when it should be INSERT INTO impdba.test(text) VALUES ("trouble \\")
[9 Jun 2005 19:17] Jorge del Conde
Thanks for your bug report !!!

Original table can be seen in the screenshot;

mysql> select * from db1.table2;
+------+--------------------+-------------------------+
| id   | mitext             | miblob                  |
+------+--------------------+-------------------------+
| 8041 | This is my / text1 | This is a default value |
| 8042 | This is my  text 2 | This is a default value |
| 8043 | This is my ' text  | This is a default value |
| 8044 | test "             | This is a default value |
| 8045 | test ß             | This is a default value |
| 8046 | test
test         | This is a default value |
| 8047 | testx \            | This is a default value |
+------+--------------------+-------------------------+
7 rows in set (0.00 sec)
[9 Jun 2005 19:19] Jorge del Conde
Original Table

Attachment: Image1.png (image/x-png, text), 10.85 KiB.

[22 Aug 2005 12:31] Michael G. Zinner
Oracle / QB screenshot

Attachment: oracle_quoting.png (image/png, text), 60.12 KiB.

[22 Aug 2005 12:33] Michael G. Zinner
Jorge,

Can you please try to verify this bug with MT 1.0.13? It works on my machine. Please find a screenshot attached.

Please paste the table create statement and a few insert statements to show the issue?

Mike
[30 Aug 2005 1:09] MySQL Verification Team
I was unable to repeat with version 1.0.15 rc:

mysql> select * from testbug;
+-----------+
| text      |
+-----------+
| trouble \ |
| trouble / |
+-----------+
2 rows in set (0.00 sec)

mysql>