summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-01-14 20:55:33 +0100
committerSergei Golubchik <serg@mariadb.org>2017-01-15 00:11:50 +0100
commit798fcb541698cbf51f1ee33f44b023c11dc2b784 (patch)
tree12a47741ef63500d339a1e076cafa500a03498b0 /sql/item_cmpfunc.cc
parent67e2028161d1f653a852f1a4679ff5e523296218 (diff)
downloadmariadb-git-798fcb541698cbf51f1ee33f44b023c11dc2b784.tar.gz
bugfix: cmp_item_row::alloc_comparators() allocated on the wrong arena
it used current_thd->alloc() and allocated on the thd's execution arena, not on table->expr_arena. Remove THD::arena_for_cached_items that is temporarily set in update_virtual_fields(), and replaces THD arena in get_datetime_value(). Instead set THD arena to table->expr_arena for the whole duration of update_virtual_fields()
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 46566206094..ebe088e5092 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -921,12 +921,7 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
if (!thd)
thd= current_thd;
- Query_arena backup;
- Query_arena *save_arena= thd->switch_to_arena_for_cached_items(&backup);
Item_cache_temporal *cache= new Item_cache_temporal(f_type);
- if (save_arena)
- thd->set_query_arena(save_arena);
-
cache->store_packed(value, item);
*cache_arg= cache;
*item_arg= cache_arg;