[MDEV-17685] LOAD DATA LOCAL INFILE does not respect column character set Created: 2018-11-12 Updated: 2018-11-14 Resolved: 2018-11-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 10.3.10 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Remy Fox | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows |
||
| Description |
|
Execute the following statements. Make sure to have a file ready at <file path> containing the string '"Réunion"'.
You will find that only the first of these two insertions will correctly insert the value. The LOAD DATA LOCAL INFILE statement will not respect the column's character set. It produces something like Réunion. In fact, even if you execute 'SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci', it will not respect the character set. Adding the line 'CHARACTER SET utf8mb4' to the LOAD DATA LOCAL INFILE won't help either. This causes two problems:
Update: my SELECT INTO OUTFILE did not specify a CHARACTER SET so this is what caused the failure. So maybe this is not a bug. |
| Comments |
| Comment by Sergei Golubchik [ 2018-11-14 ] |
|
According to https://mariadb.com/kb/en/library/load-data-infile/
|