diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-06-28 16:55:42 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-06-28 16:55:42 +0400 |
commit | 724a5105cba31fe48bd0a2754d074d8942b21153 (patch) | |
tree | ce032fcc6a755ed17768ba8cf457e5196942391e /.travis.yml | |
parent | 445339feac2b9f0164870b3c90b20b2075d117bb (diff) | |
download | mariadb-git-724a5105cba31fe48bd0a2754d074d8942b21153.tar.gz |
MDEV-16584 SP with a cursor inside a loop wastes THD memory aggressively
Problem:
push_handler() created sp_handler_entry instances on THD::main_mem_root,
which is freed only after the SP instructions execution.
So in case of a CONTINUE HANDLER inside a loop (e.g. WHILE) this approach
leaked thread memory on every loop iteration.
Changes:
- Removing sp_handler_entry declaration, it's not really needed.
- Fixing the data type of sp_rcontext::m_handlers from
Dynamic_array<sp_handler_entry*> to Dynamic_array<sp_instr_hpush_jump*>
- Fixing sp_rcontext::push_handler() to push the pointer to
an sp_instr_hpush_jump instance to the handler stack.
This instance contains everything we need.
There is no a need to allocate anything else.
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions