summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc13
1 files changed, 2 insertions, 11 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index b7b0c981c2d..fe6b8feb4de 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -442,18 +442,9 @@ bool Item_func::setup_args_and_comparator(THD *thd, Arg_comparator *cmp)
if (args[0]->cmp_type() == STRING_RESULT &&
args[1]->cmp_type() == STRING_RESULT)
{
- Query_arena *arena, backup;
- arena= thd->activate_stmt_arena_if_needed(&backup);
-
DTCollation tmp;
- bool ret= agg_arg_charsets_for_comparison(tmp, args, 2);
-
- if (arena)
- thd->restore_active_arena(arena, &backup);
-
- if (ret)
- return ret;
-
+ if (agg_arg_charsets_for_comparison(tmp, args, 2))
+ return true;
cmp->m_compare_collation= tmp.collation;
}
// Convert constants when compared to int/year field