[MDEV-11234] connect storage engine unable to read escape character in quote from CSV Created: 2016-11-04 Updated: 2016-11-07 Resolved: 2016-11-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.1.18 |
| Fix Version/s: | 10.0.29, 10.1.20, 10.2.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Daniel Luo | Assignee: | Olivier Bertrand |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7.2 |
||
| Description |
|
The table is created as follows
When reading the following line of data
There is the following error
Any insights will be appreciated. |
| Comments |
| Comment by Elena Stepanova [ 2016-11-04 ] | |||
|
Apparently, single quotes should be escaped like '' rather than \'.
https://mariadb.com/kb/en/mariadb/connect-csv-and-fmt-table-types/ | |||
| Comment by Daniel Luo [ 2016-11-05 ] | |||
|
Elena, thank you for formatting the publishing. In a real CSV file single quotes could be escaped by backslash. Do you think it`s possible that support for escape by backslash will be added | |||
| Comment by Elena Stepanova [ 2016-11-05 ] | |||
|
It sounds reasonable to me, I'll leave it to the Connect engine developer bertrandop to decide. | |||
| Comment by Olivier Bertrand [ 2016-11-05 ] | |||
|
Ok, I have added the possibility to escape the quoted character by backslash even it is not what is recommended for CSV files.
will be displayed as:
And the field:
Will result in error, the ending quote being mistaken as an internal quote. |