Bug #3259 Stored procedure names are case sensitive
Submitted: 22 Mar 2004 8:48 Modified: 23 Mar 2004 3:21
Reporter: Per-Erik Martin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0 OS:Any (Any)
Assigned to: Bugs System CPU Architecture:Any

[22 Mar 2004 8:48] Per-Erik Martin
Description:
Stored procedures are (partially) case-sensitive.
When calling a procedure the first time, it's case-sensitive, but subsequent
calls are cast-insensitive (as they should be).

How to repeat:
create table t1 ( id char(16), data int );
create procedure foo (x int) insert into t1 values ("foo", x);
call FOO(1);
call foo(2);
call FOO(3);

Suggested fix:
The mysql.proc field "name" was declared as "binary" (by mistake), simply
remove this from the system table creation scripts.
[23 Mar 2004 3:16] Per-Erik Martin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

The fix will only affect new installations of MySQL, as the problem was
the way the mysql.proc table was created.

On existing databases, either run the script "mysql_fix_privilege_tables",
or do the following command (as root):

ALTER TABLE mysql.proc MODIFY name char(64) DEFAULT '' NOT NULL,
                       MODIFY specific_name char(64) DEFAULT '' NOT NULL;

(This is safe, no existing data will be changed or lost.)
[23 Mar 2004 3:21] Per-Erik Martin
Also, please note that only the name part of qualified names ("db.name")
is case-insensitive. The db-bart is case-sensitive, as elsewhere in mysql.