summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-07-18 14:03:54 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-07-18 14:03:54 +0500
commit687863c093f0f01f54770b10fdd40f554e21a6f8 (patch)
tree5e29655e80bb3c7b7c170462c2e9ceece6dfc18c /sql/item_cmpfunc.cc
parentf4e07b861e886db5893f92238fba20346262c06b (diff)
downloadmariadb-git-687863c093f0f01f54770b10fdd40f554e21a6f8.tar.gz
IN now aggregates all argument types for comparison
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index cb7c2cb0198..78ec253c7a2 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1405,7 +1405,8 @@ void Item_func_in::fix_length_and_dec()
Item **arg, **arg_end;
uint const_itm= 1;
- if ((args[0]->result_type() == STRING_RESULT) &&
+ agg_cmp_type(&cmp_type, args, arg_count);
+ if ((cmp_type == STRING_RESULT) &&
(agg_arg_collations_for_comparison(cmp_collation, args, arg_count)))
return;
@@ -1418,7 +1419,7 @@ void Item_func_in::fix_length_and_dec()
*/
if (const_itm && !nulls_in_row())
{
- switch (args[0]->result_type()) {
+ switch (cmp_type) {
case STRING_RESULT:
uint i;
array=new in_string(arg_count-1,(qsort2_cmp) srtcmp_in,
@@ -1452,7 +1453,7 @@ void Item_func_in::fix_length_and_dec()
else
{
in_item= cmp_item::get_comparator(args[0]);
- if (args[0]->result_type() == STRING_RESULT)
+ if (cmp_type == STRING_RESULT)
in_item->cmp_charset= cmp_collation.collation;
}
maybe_null= args[0]->maybe_null;