Bug #103356 load data infile does not accept empty fields
Submitted: 18 Apr 18:36 Modified: 19 Apr 15:20
Reporter: Douglas Deanult Email Updates:
Status: Need Feedback Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6.51 / 5.7.32 OS:FreeBSD (12.2 and 13.0)
Assigned to: CPU Architecture:x86
Tags: csv input

[18 Apr 18:36] Douglas Deanult
a csv file with lines:

gives an error. This worked in earlier versions by setting sql_mode=''

An empty field is not intended as a NULL value in financial data. It means there is no value given. I think this is true in general but it is certainly so for char/text fields.

How to repeat:
load data infile ...  reading a line as above

Suggested fix:
Either restore earlier setting for sql_mode or add a new setting.
[19 Apr 15:20] MySQL Verification Team
Hi Mr. Deanult,

Thank you for your bug report.

However, we need more feedback from you in order to try to repeat it. We need a table in question and the input file.

Also, do note that 5.6 is no longer maintained. Next, MySQL is improving type checking , so if it is a problem with some type mismatch, it will not be considered a bug.