1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

aliases should be compared with my_strcasecmp (BUG#3251)

some db comparison code cleupup
removed compiler warnings


mysql-test/r/lowercase_table.result:
  test for BUG#3251
mysql-test/t/lowercase_table.test:
  test for BUG#3251
sql/item.cc:
  simple strcmp can be used for db name comparison
sql/set_var.h:
  changed initialisation order to satisfy compiler
sql/sql_cache.cc:
  simple strcmp can be used for db name comparison
sql/sql_db.cc:
  better use special cherset for files
sql/sql_parse.cc:
  simple strcmp can be used for db name comparison
  aliases should be compared with my_strcasecmp
sql/sql_select.cc:
  aliases should be compared with my_strcasecmp
This commit is contained in:
unknown
2004-03-22 15:43:13 +02:00
parent afbf1bbaa4
commit 560fc0379b
8 changed files with 34 additions and 16 deletions

View File

@@ -2712,7 +2712,7 @@ mysql_execute_command(THD *thd)
for (walk= (TABLE_LIST*) tables; walk; walk= walk->next)
{
if (!my_strcasecmp(table_alias_charset, auxi->alias, walk->alias) &&
!my_strcasecmp(table_alias_charset, walk->db, auxi->db))
!strcmp(walk->db, auxi->db))
break;
}
if (!walk)
@@ -4495,7 +4495,8 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
tables ;
tables=tables->next)
{
if (!strcmp(alias_str,tables->alias) && !strcmp(ptr->db, tables->db))
if (!my_strcasecmp(table_alias_charset, alias_str, tables->alias) &&
!strcmp(ptr->db, tables->db))
{
net_printf(thd,ER_NONUNIQ_TABLE,alias_str); /* purecov: tested */
DBUG_RETURN(0); /* purecov: tested */