diff options
author | unknown <kostja@bodhi.local> | 2006-10-23 11:51:45 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.local> | 2006-10-23 11:51:45 +0400 |
commit | 07cf5b9bd349f799bc0e81caf79edfbd29fd0512 (patch) | |
tree | 8975cf9bcdde83b55d94ab5299cb5d61a93acb9c /sql/sql_base.cc | |
parent | 8db4dc3f91dfbe03181e63ed45bdf35a5d65aeb0 (diff) | |
parent | 133e91aa89e05437158946c0a3b7f7d2f27a0f6d (diff) | |
download | mariadb-git-07cf5b9bd349f799bc0e81caf79edfbd29fd0512.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
mysql-test/t/func_gconcat.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index ce1011fddf4..0f6715fc078 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -3455,13 +3455,20 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter, const char *field_name=0; const char *table_name=0; bool found_unaliased_non_uniq= 0; + /* + true if the item that we search for is a valid name reference + (and not an item that happens to have a name). + */ + bool is_ref_by_name= 0; uint unaliased_counter; LINT_INIT(unaliased_counter); // Dependent on found_unaliased *unaliased= FALSE; - if (find->type() == Item::FIELD_ITEM || find->type() == Item::REF_ITEM) + is_ref_by_name= (find->type() == Item::FIELD_ITEM || + find->type() == Item::REF_ITEM); + if (is_ref_by_name) { field_name= ((Item_ident*) find)->field_name; table_name= ((Item_ident*) find)->table_name; @@ -3573,7 +3580,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter, } } else if (!table_name && (find->eq(item,0) || - find->name && item->name && + is_ref_by_name && find->name && item->name && !my_strcasecmp(system_charset_info, item->name,find->name))) { @@ -4904,6 +4911,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves, thd->set_query_id=1; select_lex->cond_count= 0; + select_lex->between_count= 0; for (table= tables; table; table= table->next_local) { |