Bug #2893 The use of UTF-8 identifiers is not documented
Submitted: 19 Feb 2004 8:44 Modified: 1 Apr 2004 17:34
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:
Assigned to: Paul DuBois CPU Architecture:Any

[19 Feb 2004 8:44] Marko Mäkelä
Description:
MySQL manual, section 10.2, lists some restrictions for column names.  The maximum length is reported in bytes.  What if the UTF-8 character set is used?  Is the max length then fixed at 21 or 85 characters instead of 64 or 255, or does it vary depending on the actual length of the UTF-8 byte stream?

Furthermore, it says: "no identifier can contain ASCII 0, ASCII 255, or the quoting character." What is "ASCII 255"? ASCII is a 7-bit charset, or 0..127. Does this ban the latin1 char ÿ (ydiaeresis) and all Unicode chars whose binary representation includes 0xff? Does "quoting character" depend on ANSI_MODE? Can't the quoting character be escaped?

How to repeat:
See the MySQL manual, section 10.2.

Suggested fix:
Clarify these points.
[18 Mar 2004 22:50] Alexander Barkov
Paul, please take care of this bug.
[30 Mar 2004 6:48] Marko Mäkelä
It seems that ` is not allowed in table names in 4.0:

mysql> create table ```` (`a` int);
ERROR 1103: Incorrect table name ''

and while running mysqld --sql-mode=ansi:

mysql> create table "`" (`a` int);
ERROR 1103: Incorrect table name ''

Note that the error message is misleading: it should say '`'.
[1 Apr 2004 17:34] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).