Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
I run this script:
rm -f /tmp/test.txt
|
mysql-tmp --table --default-character-set=sjis test << END
|
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a BLOB);
|
INSERT INTO t1 VALUES (0xEE5C);
|
SELECT * INTO OUTFILE '/tmp/test.txt' FROM t1;
|
TRUNCATE TABLE t1;
|
LOAD DATA INFILE '/tmp/test.txt' INTO TABLE t1 CHARACTER SET sjis;
|
SELECT HEX(a) FROM t1;
|
END
|
it returns this result:
+--------+
|
| HEX(a) |
|
+--------+
|
| EE5C |
|
+--------+
|
Now if I run exactly the same script with --default-character-set=utf8:
rm -f /tmp/test.txt
|
mysql-tmp --table --default-character-set=utf8 test << END
|
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a BLOB);
|
INSERT INTO t1 VALUES (0xEE5C);
|
SELECT * INTO OUTFILE '/tmp/test.txt' FROM t1;
|
TRUNCATE TABLE t1;
|
LOAD DATA INFILE '/tmp/test.txt' INTO TABLE t1 CHARACTER SET sjis;
|
SELECT HEX(a) FROM t1;
|
It returns a different result:
+--------+
|
| HEX(a) |
|
+--------+
|
| EE5C0A |
|
+--------+
|
The result should not depend on --default-character-set=xxx.