#At file:///Users/shulga/projects/mysql/mysql-5.1-bug11840395/ based on revid:vasil.dimov@stripped
3625 Dmitry Shulga 2011-05-27
Fixed bug#11840395 (formerly known as bug#60347): THE STRING "VERSIONDATA"
SEEMS TO BE 'LEAKING' INTO THE SCHEMA NAME SPACE.
The problem was that if you create a stored function at a schema that have
uppercase letters in its name AND --lower_case_table_names is equal to
either 1 or 2, then when you try to call this stored function like such a way
you will got error like this
ERROR 1305 (42000): FUNCTION someMixedCaseDb.my_function_name does not exist
The reason for this bug is that when a stored function is being created
its name schema name is converted to lowercase if the value of option
--lower_case_table_names is not equal to 0. However, this conversion
isn't done when this stored function called by fully qualified name
(i.e. in manner as schema_name.function_name). For stored procedures
all is ok since during parsing clause 'call schemaName.sp_name()'
schema name converted to lowercase.
The solution is to convert stored function name to lowercase when it called
and the value of option lower_case_table_names is not equal to 0.
Processing for rule for 'function_call_generic:' was modified:
add call to check_db_name() when handling token
ident '.' ident. Function implementation for check_db_name()
makes convertion of schema name to lowercase as its side effect.
=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy 2010-10-13 05:28:58 +0000
+++ b/sql/sql_yacc.yy 2011-05-27 03:37:08 +0000
@@ -8083,6 +8083,11 @@ function_call_generic:
version() (a vendor can specify any schema).
+ if (!$1.str || check_db_name(&$1))
+ my_error(ER_WRONG_DB_NAME, MYF(0), $1.str);
item= builder->create(thd, $1, $3, true, $5);
Attachment: [text/bzr-bundle] firstname.lastname@example.org
|• bzr commit into mysql-5.1 branch (Dmitry.Shulga:3625) Bug#60347 Bug#11840395||Dmitry Shulga||27 May|