summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2023-01-10 21:04:17 +0100
committerSergei Golubchik <serg@mariadb.org>2023-01-10 21:04:17 +0100
commitfdcfc251271c2c0d29d77c7fe7cee356f16f2db5 (patch)
tree4665f47d2da9c38db37dfd630199b142ec5ccc08 /sql/item_cmpfunc.cc
parent6cb84346e1bde63ec79dd5e3a7d80f69bb106ead (diff)
parent56948ee54c9d113f07f725ebdc560d1919fc6676 (diff)
downloadmariadb-git-fdcfc251271c2c0d29d77c7fe7cee356f16f2db5.tar.gz
Merge branch '10.3' into 10.4
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 278e11f4002..7fb2ff32842 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -418,18 +418,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