diff options
author | bell@sanja.is.com.ua <> | 2004-03-22 15:43:13 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2004-03-22 15:43:13 +0200 |
commit | bbb6642a66be0b94c6a14ff2ae7ea27f31208e3d (patch) | |
tree | 9c2daacc3ecbf555341d9004c43b7a91dab4fe29 /sql/sql_parse.cc | |
parent | 7411ac19df83581ba74ea45ae5e575abd423c68f (diff) | |
download | mariadb-git-bbb6642a66be0b94c6a14ff2ae7ea27f31208e3d.tar.gz |
aliases should be compared with my_strcasecmp (BUG#3251)
some db comparison code cleupup
removed compiler warnings
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index d21f20d1697..73811dddf75 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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 */ |