mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 04:05:32 +02:00
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()
This commit is contained in:
parent
67e2028161
commit
798fcb5416
6 changed files with 20 additions and 34 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue