Bug #72170 Table name lenght limit is 50 chars, not 64, when using "high" unicode
Submitted: 31 Mar 2014 13:59 Modified: 31 Mar 2014 14:28
Reporter: Hartmut Holzgraefe Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:5.6.17 (actually anything >= 5.1?) OS:Linux
Assigned to: CPU Architecture:Any

[31 Mar 2014 13:59] Hartmut Holzgraefe
Description:
Due to the way identifier mapping works since 5.1+ 
a Unicode character in a table name may be converted
to a five character sequence in table file names

https://dev.mysql.com/doc/refman/5.6/en/identifier-mapping.html

So when using "high" Unicode code points in a table name 
exclusively the table name is limited to 50 characters
instead of 64 as documented on

http://dev.mysql.com/doc/refman/5.6/en/identifiers.html

How to repeat:
Using 'ഥ' ( \U0D25 MALAYALAM LETTER THA http://unicode-table.com/en/0D25/ )
here as I like that it looks like a nuclear power plant ;)

mysql> CREATE TABLE `ഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥ` (val INT primary key); // 50x 'ഥ'
Query OK, 0 rows affected (0.45 sec)

mysql> CREATE TABLE `ഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥ` (val INT primary key); // 51x 'ഥ'
ERROR 1005 (HY000): Can't create table 'ഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥഥ' (errno: 36)

Suggested fix:
Either make sure that the identifier -> filename mapping works with the "up to 64 characters for a table name" limit in all cases, or at least document the new limitation caused by the 5.1 style mapping ...
[31 Mar 2014 14:04] Peter Laursen
(and a spurious 'mysqlcheck' error with such table names reported here http://bugs.mysql.com/bug.php?id=72150.  Even though this is likely unrelated there is something to look into!)
[31 Mar 2014 14:28] MySQL Verification Team
Thank you for the bug report.