Details
-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 5.5.39, 10.0.13
-
Fix Version/s: 10.0
-
Component/s: None
-
Labels:None
Description
This SQL script:
SET NAMES utf8;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a ENUM('a','b','?','.') CHARACTER SET latin1);
INSERT INTO t1 VALUES ('ÿ'),('я');
SHOW WARNINGS;
SELECT * FROM t1;
produces the following output:
MariaDB [test]> SET NAMES utf8;
Query OK, 0 rows affected (0.00 sec)
MariaDB [test]> DROP TABLE IF EXISTS t1;
Query OK, 0 rows affected (0.12 sec)
MariaDB [test]> CREATE TABLE t1 (a ENUM('a','b','?','.') CHARACTER SET latin1);
Query OK, 0 rows affected (0.32 sec)
MariaDB [test]> INSERT INTO t1 VALUES ('ÿ'),('я');
Query OK, 2 rows affected, 1 warning (0.03 sec)
Records: 2 Duplicates: 0 Warnings: 1
MariaDB [test]> SHOW WARNINGS;
+---------+------+----------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------+
| Warning | 1265 | Data truncated for column 'a' at row 1 |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)
MariaDB [test]> SELECT * FROM t1;
+------+
| a |
+------+
| |
| ? |
+------+
2 rows in set (0.00 sec)
Notice:
- the Latin letter 'ÿ' was correctly replaced to empty value with a warning.
- the Cyrillic letter 'я' was erroneously misinterpreted as the question
mark value silently.
It should be fixed to work in the same way for both values.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions