diff options
author | unknown <bell@sanja.is.com.ua> | 2005-10-28 10:12:36 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-10-28 10:12:36 +0300 |
commit | ab2389ef5a55a7c4bd02870f809477803e7ff8e1 (patch) | |
tree | c0a710cd157405baf40b3e18db1740f006bc16e8 /sql/item.cc | |
parent | c1852b1202af4ebbde04d5f774458991e024a82a (diff) | |
parent | a397d1f7149dcdeac86e9e4870780dcd8e99a908 (diff) | |
download | mariadb-git-ab2389ef5a55a7c4bd02870f809477803e7ff8e1.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-owner7-5.0
sql/item.cc:
Auto merged
sql/sql_update.cc:
Auto merged
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index dc4369f406d..51fb2fe34fd 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -755,7 +755,8 @@ bool Item_string::eq(const Item *item, bool binary_cmp) const { if (binary_cmp) return !stringcmp(&str_value, &item->str_value); - return !sortcmp(&str_value, &item->str_value, collation.collation); + return (collation.collation == item->collation.collation && + !sortcmp(&str_value, &item->str_value, collation.collation)); } return 0; } @@ -5080,8 +5081,15 @@ bool Item_insert_value::eq(const Item *item, bool binary_cmp) const bool Item_insert_value::fix_fields(THD *thd, Item **items) { DBUG_ASSERT(fixed == 0); + /* We should only check that arg is in first table */ + st_table_list *orig_next_table= context->last_name_resolution_table; + context->last_name_resolution_table= context->first_name_resolution_table; if (!arg->fixed && arg->fix_fields(thd, &arg)) + { + context->last_name_resolution_table= orig_next_table; return TRUE; + } + context->last_name_resolution_table= orig_next_table; if (arg->type() == REF_ITEM) { @@ -5093,6 +5101,7 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items) arg= ref->ref[0]; } Item_field *field_arg= (Item_field *)arg; + if (field_arg->field->table->insert_values) { Field *def_field= (Field*) sql_alloc(field_arg->field->size_of()); |