[MDEV-22581] LOAD DATA ENCLOSE BY preserves quotes if input file has lines terminated with '\r\n' Created: 2020-05-15 Updated: 2020-05-23 Resolved: 2020-05-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Insert, Data types |
| Affects Version/s: | 10.4.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Marios Hadjieleftheriou | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian 4.19.67-2 |
||
| Description |
|
I am using LOAD DATA INFILE with ENCLOSED BY to ingest a csv file whose values are all enclosed by quotes (it does not matter whether it is single or double quotes). For VARCHAR and TEXT fields, the quotes are properly removed from the values for all columns in the table except the last column, if the input csv file has lines terminated by '\r\n'. Here is how to reproduce it:
|
| Comments |
| Comment by Marios Hadjieleftheriou [ 2020-05-15 ] |
|
I realized that it was my mistake. It works fine if I do this: Does it make sense to make the default line terminator be both \n and \r\n? |
| Comment by Marios Hadjieleftheriou [ 2020-05-23 ] |
|
Then it seems to preserve the quotes for the last column only, not all On Mon, May 18, 2020 at 8:25 AM Sergei Golubchik (Jira) <jira@mariadb.org> |