mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
Analysis: ------------------------------- According to the Manual (http://dev.mysql.com/doc/refman/5.1/en/identifier-case-sensitivity.html): "Column, index, stored routine, and event names are not case sensitive on any platform, nor are column aliases." In other words, 'lower_case_table_names' does not affect the behaviour of those identifiers. On the other hand, trigger names are case sensitive on some platforms, and case insensitive on others. 'lower_case_table_names' does not affect the behaviour of trigger names either. The bug was that SHOW statements did case sensitive comparison for stored procedure / stored function / event names. Fix: Modified the code so that comparison in case insensitive for routines and events for "SHOW" operation.
This commit is contained in:
@ -4323,7 +4323,8 @@ bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table,
|
||||
(sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0)
|
||||
{
|
||||
restore_record(table, s->default_values);
|
||||
if (!wild || !wild[0] || !wild_compare(sp_name.c_ptr_safe(), wild, 0))
|
||||
if (!wild || !wild[0] || !wild_case_compare(system_charset_info,
|
||||
sp_name.c_ptr_safe(), wild))
|
||||
{
|
||||
int enum_idx= (int) proc_table->field[5]->val_int();
|
||||
table->field[3]->store(sp_name.ptr(), sp_name.length(), cs);
|
||||
@ -5325,7 +5326,7 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
if (!(!wild || !wild[0] || !wild_compare(et.name.str, wild, 0)))
|
||||
if (!(!wild || !wild[0] || !wild_case_compare(scs, et.name.str, wild)))
|
||||
DBUG_RETURN(0);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user