Description:
if we create an enum/set column table and fill the elements with binary literal, we will get unreadable results
How to repeat:
mysql> create table t(a enum(0x91) default 0x91);
Query OK, 0 rows affected, 1 warning (0.03 sec)
mysql> show warnings;
+---------+------+----------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------+
| Warning | 1300 | Invalid utf8mb4 character string: '91' |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)
it will create success and then we get then unreadable results from t
mysql> insert into t values (0x91);
Query OK, 1 row affected (0.01 sec)
mysql> select hex(a), a from t;
+--------+------+
| hex(a) | a |
+--------+------+
| 91 | � |
+--------+------+
1 row in set (0.00 sec)
if we create a char(10) column with an invalid default value.
mysql> create table t(a char(10) default 0x91);
ERROR 1067 (42000): Invalid default value for 'a'
it reports an error, I think MySQL should make them have the same behavior