Bug #100736 LOAD DATA INFILE does not load one row from specific csv
Submitted: 3 Sep 2020 20:34 Modified: 4 Sep 2020 0:49
Reporter: Sergey Zenger Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S2 (Serious)
Version:5.6.49 OS:Any (CentOS 7, Windows)
Assigned to: CPU Architecture:x86 (x86_64)

[3 Sep 2020 20:34] Sergey Zenger
Description:
The LOAD DATA INFILE stops loading records from one specific CSV file and reports zero records affected. When selecting from the table we find that records prior one specific record are in the table. The mysql cannot load this record for some reasons.
Downgrade to the version 5.6.38 resolved this issue for me.

How to repeat:
1. Create the table:

CREATE TABLE `s1_lms_quiz_t_question_test` (
  `c_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `course_id` int(11) NOT NULL,
  `c_quiz_id` int(10) unsigned NOT NULL DEFAULT '0',
  `c_point` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `c_attempts` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `c_question` text NOT NULL,
  `c_image` varchar(255) NOT NULL DEFAULT '',
  `c_type` tinyint(4) NOT NULL DEFAULT '0',
  `published` int(11) DEFAULT '1',
  `ordering` int(11) DEFAULT '0',
  `c_pool` int(11) NOT NULL DEFAULT '0',
  `c_qcat` int(11) NOT NULL DEFAULT '0',
  `params` text NOT NULL,
  `c_explanation` text NOT NULL,
  `c_pool_gqp` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`c_id`),
  KEY `c_quiz_id` (`c_quiz_id`),
  KEY `course_id` (`course_id`),
  KEY `c_qcat` (`c_qcat`),
  KEY `cat_list` (`course_id`,`c_quiz_id`,`published`,`c_qcat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

2. Load the data with the following command:

load data infile '/test/s1_lms_quiz_t_question.csv' 
into table s1_lms_quiz_t_question_test  
character set utf8
fields terminated by ',' 
optionally enclosed by '"' 
lines starting by '' terminated by '\n';

3. When loading an example CSV file provided, the only first record will be uploaded. The second record is the problem one, which cannot be loaded. Expected result is that all three records will be loaded in the table.
[3 Sep 2020 20:37] Sergey Zenger
The csv file for reproducing the bug

Attachment: s1_lms_quiz_t_question.csv (application/vnd.ms-excel, text), 4.12 KiB.

[4 Sep 2020 0:49] MySQL Verification Team
Thank you for the bug report.