1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03: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:
Sergei Golubchik
2017-01-14 20:55:33 +01:00
parent 67e2028161
commit 798fcb5416
6 changed files with 20 additions and 34 deletions

View File

@ -3102,26 +3102,7 @@ public:
}
}
private:
/*
This reference points to the table arena when the expression
for a virtual column is being evaluated
*/
Query_arena *arena_for_cached_items;
public:
void reset_arena_for_cached_items(Query_arena *new_arena)
{
arena_for_cached_items= new_arena;
}
Query_arena *switch_to_arena_for_cached_items(Query_arena *backup)
{
if (!arena_for_cached_items)
return 0;
set_n_backup_active_arena(arena_for_cached_items, backup);
return backup;
}
void clear_wakeup_ready() { wakeup_ready= false; }
/*
Sleep waiting for others to wake us up with signal_wakeup_ready().