Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
I have a file:
printf "\x61\xD1\x91\xD1\x91\x62\xD1\x91\xD1\x91\x63\xD1\x91\xD1\x91" >/tmp/test1.txt
|
The file looks like this in a text editor:
aёёbёёcёё
|
This script:
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8); |
LOAD DATA INFILE '/tmp/test1.txt' INTO TABLE t1 CHARACTER SET utf8 LINES TERMINATED BY 'ёё'; |
SHOW WARNINGS;
|
SELECT * FROM t1; |
warns that the separator is non-ASCII:
+---------+------+-------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+-------------------------------------------------------+
|
| Warning | 1638 | Non-ASCII separator arguments are not fully supported |
|
+---------+------+-------------------------------------------------------+
|
but otherwise works without problems and correctly returns these records:
+------+
|
| a |
|
+------+
|
| a |
|
| b |
|
| c |
|
+------+
|
Now if I slightly modify the script to skip the first line:
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8); |
LOAD DATA INFILE '/tmp/test1.txt' INTO TABLE t1 CHARACTER SET utf8 LINES TERMINATED BY 'ёё' IGNORE 1 LINES; |
SHOW WARNINGS;
|
SELECT * FROM t1; |
it returns empty set instead of two records.
Attachments
Issue Links
- blocks
-
MDEV-6353 my_ismbchar() and my_mbcharlen() refactoring
- Closed