-
-
Notifications
You must be signed in to change notification settings - Fork 584
Closed
dolthub/go-mysql-server
#3270Labels
bugSomething isn't workingSomething isn't workingcorrectnessWe don't return the same result as MySQLWe don't return the same result as MySQLcustomer issueimport
Description
Related: #9884
Dolt 1.59.20.
Problem
When enclosing a field in LOAD DATA
, any character should be allowed in the field except the enclosing character itself, unless it's escaped. That's not the case here.
If I terminate fields with a comma, I will get a "field not properly enclosed" error if any field contains a comma, despite the fact that the field is enclosed by quotes.
Schema:
CREATE TABLE `my_table` (
`id` int NOT NULL,
`txt` varchar(16) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
Query:
LOAD DATA LOCAL INFILE 'data'
INTO TABLE my_table
FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '"'
LINES TERMINATED BY '\n'
(id, txt)
Data:
"1","foo,bar"
Expected result (MySQL / MariaDB):
id | txt |
---|---|
1 | foo,bar |
Actual result (Dolt 1.59.20):
Error 1105 (HY000): error: field not properly enclosed
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcorrectnessWe don't return the same result as MySQLWe don't return the same result as MySQLcustomer issueimport