diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-02-19 17:59:00 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-02-19 17:59:00 +0400 |
commit | fafeaf460bdb72e8f9976aada6c1c8bcce48f993 (patch) | |
tree | 5b584f2a2468cfc4803488226ffce1ee093eb3d5 /sql/item_cmpfunc.cc | |
parent | b2a8faebea8b83c2d90096dac2627290f090bb07 (diff) | |
parent | c2e23208ef7ae6b315ca4988e903bff2bc0284d4 (diff) | |
download | mariadb-git-fafeaf460bdb72e8f9976aada6c1c8bcce48f993.tar.gz |
5.0-bugteam->5.1-bugteam merge
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index bd90dd81365..a9bfea1b806 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -549,7 +549,8 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type) my_error(ER_OPERAND_COLUMNS, MYF(0), (*a)->element_index(i)->cols()); return 1; } - comparators[i].set_cmp_func(owner, (*a)->addr(i), (*b)->addr(i)); + if (comparators[i].set_cmp_func(owner, (*a)->addr(i), (*b)->addr(i))) + return 1; } break; } @@ -894,6 +895,16 @@ int Arg_comparator::set_cmp_func(Item_bool_func2 *owner_arg, get_value_func= &get_time_value; return 0; } + else if (type == STRING_RESULT && + (*a)->result_type() == STRING_RESULT && + (*b)->result_type() == STRING_RESULT) + { + DTCollation coll; + coll.set((*a)->collation.collation); + if (agg_item_set_converter(coll, owner_arg->func_name(), + b, 1, MY_COLL_CMP_CONV, 1)) + return 1; + } return set_compare_func(owner_arg, type); } |