diff options
author | monty@hundin.mysql.fi <> | 2002-04-13 15:34:39 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-04-13 15:34:39 +0300 |
commit | b5a145d87290aad611c3aa71e5e9a736d467ec5a (patch) | |
tree | 6bb12842fb04d64fa854f04ec3d07da1e1f7c48b /sql/sql_base.cc | |
parent | e5866a7a316869d06677babdd45a62dfe6026db1 (diff) | |
parent | ee737d2fc2b2a1ec64e54146c986f2535314ae4e (diff) | |
download | mariadb-git-b5a145d87290aad611c3aa71e5e9a736d467ec5a.tar.gz |
merge
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 88854396ae3..031c83a2aeb 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -50,7 +50,8 @@ static byte *cache_key(const byte *record,uint *length, void table_cache_init(void) { - VOID(hash_init(&open_cache,table_cache_size+16,0,0,cache_key, + VOID(hash_init(&open_cache,system_charset_info, + table_cache_size+16,0,0,cache_key, (void (*)(void*)) free_cache_entry,0)); mysql_rm_tmp_tables(); } @@ -781,7 +782,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, { if (table->key_length == key_length && !memcmp(table->table_cache_key,key,key_length) && - !my_strcasecmp(table->table_name,alias)) + !my_strcasecmp(system_charset_info,table->table_name,alias)) goto reset; } my_printf_error(ER_TABLE_NOT_LOCKED,ER(ER_TABLE_NOT_LOCKED),MYF(0),alias); @@ -1560,11 +1561,12 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length, Field **ptr=table->field; while ((field = *ptr++)) { - if (!my_strcasecmp(field->field_name, name)) + if (!my_strcasecmp(system_charset_info, field->field_name, name)) goto found; } } - if (allow_rowid && !my_strcasecmp(name,"_rowid") && + if (allow_rowid && + !my_strcasecmp(system_charset_info, name, "_rowid") && (field=table->rowid_field)) goto found; return (Field*) 0; @@ -1687,7 +1689,8 @@ find_item_in_list(Item *find,List<Item> &items) { if (field_name && item->type() == Item::FIELD_ITEM) { - if (!my_strcasecmp(((Item_field*) item)->name,field_name)) + if (!my_strcasecmp(system_charset_info, + ((Item_field*) item)->name,field_name)) { if (!table_name) { @@ -1710,8 +1713,9 @@ find_item_in_list(Item *find,List<Item> &items) } } else if (!table_name && (item->eq(find,0) || - find->name && - !my_strcasecmp(item->name,find->name))) + find->name && + !my_strcasecmp(system_charset_info, + item->name,find->name))) { found=li.ref(); break; @@ -1939,7 +1943,8 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds) // TODO: This could be optimized to use hashed names if t2 had a hash for (j=0 ; j < t2->fields ; j++) { - if (!my_strcasecmp(t1->field[i]->field_name, + if (!my_strcasecmp(system_charset_info, + t1->field[i]->field_name, t2->field[j]->field_name)) { Item_func_eq *tmp=new Item_func_eq(new Item_field(t1->field[i]), |