Bug #22034 Events: U and ü are the same name
Submitted: 5 Sep 2006 23:10 Modified: 22 Jan 2014 14:27
Reporter: Peter Gulutzan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.12-beta-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Assigned Account CPU Architecture:Any

[5 Sep 2006 23:10] Peter Gulutzan
Description:
If I create an event named U, I can't create an event
named ü. I realize that the same observation is true for
names of cursors, conditions, functions,
procedures, savepoints, and variable names.
But it's not true for
names of columns, constraints, databases, partitions, statements,
tables, triggers, users, and @variable names.
And the latter rule is better because:

* The idea of "accented characters" which are equivalent
  to "unaccented characters" is good for English and
  good for searches. But it's not okay for all languages
  (e.g. in Swedish ö is a separate letter, in Spanish ñ
  is a separate letter). And, although the French should
  be happy to find both 'côte' and 'côté' together, they
  might think it odd that they can't have a function
  côte because there's already one named côté.

* The U <> ü rule applies for MySQL's most commonly
  used objects, tables and columns.

I am not proposing to change the rules for identifiers
other than events. It's too bad, but it's too late.

I am not proposing to change the information_schema collation.

How to repeat:
mysql> create event U on schedule every 1 second do set @a=5//
Query OK, 1 row affected (0.00 sec)

mysql> create event ü on schedule every 1 second do set @a=5//
ERROR 1524 (HY000): Event 'ü' already exists

Suggested fix:
[5 Sep 2006 23:49] MySQL Verification Team
Thank you for the bug report. Verified as described on Suse 10 32-bits.
[6 Sep 2006 0:49] Peter Laursen
This also applies to 5.0.24a.

.. and VIEWs behave identically to TABLEs - just for completenes ;-)
[6 Dec 2007 21:40] Konstantin Osipov
Per IRC discussion:
* the root cause of the bug is that the system table mysql.event uses a case-insensitive and accent-insensitive collation for 'name' column.
Since there is a primary key defined on (db, name) columns of mysql.event table,
any fix for that bug would require a change in the definition of this system table
* this is consistent with collation of stored routine names
* this is not consistent with collation of trigger, table, view and column names

Right now MySQL does not supply a collation that is case-insensitive but accent-sensitive. It could be implemented, and mysql.event.name could be altered to use it.
It, however, would likely have to be altered again to use utf8_bin when WL#923 architecture is approved.
A wise thing to do, therefore, is to wait and do nothing until WL#923 architecture is approved.
[22 Jan 2014 14:27] Ståle Deraas
Abandoned use of "to be fixed later" and going to status "verified"