Bug #99733 Table Import Wizard doesn't import whole file
Submitted: 28 May 2020 23:02 Modified: 29 Jun 2020 14:10
Reporter: Naomi Nosonovsky Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:Latest OS:Any
Assigned to: CPU Architecture:Any
Tags: csv import

[28 May 2020 23:02] Naomi Nosonovsky
Description:
I have a CSV file with 5342 rows. When I use the Task Data Import Wizard it only imports 2482 rows and it doesn't show any errors, says all is correct.

If I try to do this operation manually using 
LOAD DATA INFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/MyFileName.csv' 
INTO TABLE myTableName
FIELDS TERMINATED BY ',' 
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;

then I get an error about data truncated on a particular row, e.g.

Error Code: 1262. Row 1324 was truncated; it contained more data than there were input columns

although that row doesn't seem wrong to me when I look at it in Notepad++ or other editor. How can I import all rows correctly?

How to repeat:
Try to import from CSV with 5342 rows and lots of all columns (column names include various characters such as /, etc.)

Suggested fix:
If all rows cannot be imported successfully, please provide the information in the log or by other means. The Wizard tricks me to believe that all is imported correctly but when I examine the table I can see that only half of the rows were imported.
[28 May 2020 23:24] MySQL Verification Team
Thank you for the bug report. I couldn't repeat with my own data, please provide  your exactly OS, MySQL server version, the create table statement and the cvs file (private). Thanks.
[31 May 2020 15:34] Naomi Nosonovsky
I've reproduced with a different CSV too (e.g. the file was about 30K but I got only 10K rows copied). I think it's unreliable.

Also, tried using Data Import Wizard to move Access tables and was unsuccessful either (some weird errors).

Finally I made a dump file and was able to import it OK (the process took ~1h.), but there was no visible progress bar at all and only at the very end the progress bar showed up all filled in.
[31 May 2020 18:22] Naomi Nosonovsky
My OS is Windows 10 PRO, version 10.0.18363 Build 18363

# Variable_name	Value
innodb_version	8.0.12
protocol_version	10
slave_type_conversions	
tls_version	TLSv1,TLSv1.1,TLSv1.2
version	8.0.12
version_comment	MySQL Community Server - GPL
version_compile_machine	x86_64
version_compile_os	Win64
version_compile_zlib	1.2.11
[22 Jun 2020 12:07] MySQL Verification Team
Hello Naomi Nosonovsky,

Thank you for sharing the details but we need create table statement and the csv file (private) to investigate this further. Thanks.

Regards,
Ashwini Patil
[22 Jun 2020 14:23] Naomi Nosonovsky
I cannot share the CSV file as it contains confidential data and the create table was produced as part of the import process. Several of the files I had showed the same issue (e.g. didn't produce correct number of rows on the first or second attempt to import but eventually I was able to import all of them correctly).
[29 Jun 2020 11:43] MySQL Verification Team
Hello Naomi Nosonovsky,

Imho this is duplicate of Bug #97813, please see Bug #97813.

Regards,
Ashwini Patil
[29 Jun 2020 14:10] Naomi Nosonovsky
Yes, it does look like a duplicate of the mentioned issue.