Description:
According to the page http://dev.mysql.com/doc/refman/5.7/en/identifiers.html
ASCII NUL (U+0000) and supplementary characters (U+10000 and higher) are not permitted in quoted or unquoted identifiers.
Moreover MySQL is using 3-byte subset of UTF-8 internally, which cannot represent such characters at all.
However the server doesn't reject such characters when I type them in as schema object names.
How to repeat:
mysql> set names utf8mb4;
Query OK, 0 rows affected (0.00 sec)
mysql> create database 𦉘𦟌𦧲;
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> use 𦉘𦟌𦧲;
Database changed
mysql> create table 𦉘𦟌𦧲 (𦉘𦟌𦧲 INT);
Query OK, 0 rows affected, 2 warnings (0.01 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| ??? |
| mtr |
| mysql |
| performance_schema |
| sys |
| test |
+--------------------+
7 rows in set (0.00 sec)
mysql> show tables;
+---------------+
| Tables_in_??? |
+---------------+
| ??? |
+---------------+
1 row in set (0.00 sec)
mysql> show create table 𦉘𦟌𦧲\G
*************************** 1. row ***************************
Table: ???
Create Table: CREATE TABLE `???` (
`???` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set, 1 warning (0.00 sec)
Suggested fix:
Reject incorrect characters in the schema object names.