brittneybrinsfield / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

Improve reporting of MySQL warnings for edits and imports #1415

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. File --> Import  "chinese_dict.csv"
2. create a new table named "chinese_dict"
3. import csv

What is the expected output? What do you see instead?
Expect to see the same data in the sql table as the csv. Instead, some 
characters get dropped completely. 

What version of Sequel Pro are you using? What version of MySQL are you
connecting to on the server?
Sequel Pro 0.9.9.1
mysql 5.5.10 

Please provide any additional information below.
I suspect the issue has something to do with characters in one of the 
CJK-Extended unicode ranges. It looks like Sequel Pro just stops processing the 
field when it encounters certain characters. 

I've also noticed the same issue when doing an SQL import using sequel pro: 
some characters were dropped. When I use mysql to import the same SQL file, it 
imports the data correctly.

Original issue reported on code.google.com by stevenda...@gmail.com on 4 Aug 2012 at 12:46

Attachments:

GoogleCodeExporter commented 9 years ago
This particular issue appears to be because some of the CJK-Extended characters 
(for example 𡛷 and 𠀤) aren't considered a valid part of the MySQL UTF8 
range:

MySQL Warning Code 1366: Incorrect string value: '...' for column 
'康熙字典内容' at row 1

I've experimented with sending the characters to the server as hex-encoded 
strings using Sequel Pro, and that encounters the same problem; changing the 
table to use BLOB types works fine as well.

So that makes sense, but does highlight the fact we need to display warnings in 
the interface as well as errors.

The SQL file issue might be separate - do you have a test case for that, by any 
chance?

Original comment by rowanb@gmail.com on 4 Aug 2012 at 4:11

GoogleCodeExporter commented 9 years ago
Thanks for getting back to me so quickly. I tried using an sql file and it 
fails to import properly using mysql command line and Sequel Pro, which is what 
you'd expect if it's a mysql issue.

I've provided a test sql file for you.

Original comment by stevenda...@gmail.com on 5 Aug 2012 at 10:13

Attachments:

GoogleCodeExporter commented 9 years ago
As long as it fails to import properly using the mysql command line, that's 
fine - thought there might be a case where that was somehow working!

I'm going to retitle this to reflect that we need to improve display of MySQL 
warnings as well as errors; we'll have to do this for imports, custom queries, 
and edits made via the interface, eek!

Original comment by rowanb@gmail.com on 5 Aug 2012 at 8:37