Bug #56224 Function name is case-sensitive
Submitted: 24 Aug 2010 16:46 Modified: 7 Jun 2012 16:27
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Stored Routines Severity:S2 (Serious)
Version:5.1.50 OS:Any
Assigned to: CPU Architecture:Any

[24 Aug 2010 16:46] Todd Farmer
Stored function names are case sensitive, at least in some use cases:

mysql> use test
Database changed
mysql> CREATE DEFINER=`root`@`localhost` FUNCTION `testFunction`( ) RETURNS INT DETERMINISTIC RETURN 1;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW FUNCTION STATUS LIKE 'testFunction'\G
*************************** 1. row ***************************
                  Db: test
                Name: testFunction
                Type: FUNCTION
             Definer: root@localhost
            Modified: 2010-08-24 09:38:08
             Created: 2010-08-24 09:38:08
       Security_type: DEFINER
character_set_client: utf8
collation_connection: utf8_general_ci
  Database Collation: latin1_swedish_ci
1 row in set (0.03 sec)

mysql> SHOW FUNCTION STATUS LIKE 'testfunction'\G
Empty set (0.03 sec)

mysql> show global variables like '%case%';
| Variable_name          | Value |
| lower_case_file_system | ON    |
| lower_case_table_names | 1     |
2 rows in set (0.00 sec)

The documentation says this should not be the case:

"Column, index, stored routine, and event names are not case sensitive on any platform, nor are column aliases."


How to repeat:
See above.

Suggested fix:
Make function names not case sensitive.
[7 Sep 2010 10:46] Peter Laursen
It is simply annoying!  I think this is a regression?
[7 Jun 2012 16:27] Paul DuBois
Noted in 5.1.63, 5.5.23, 5.6.6 changelogs. 

SHOW statements treated stored procedure, stored function, and event 
names as case sensitive.