1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-07 17:42:39 +03:00
Files
mariadb/mysql-test/main
Alexander Barkov 724a5105cb 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.
2018-06-28 16:55:42 +04:00
..
2018-05-17 08:42:53 +03:00
2018-05-17 08:42:53 +03:00
2018-06-18 15:43:59 +03:00
2018-06-18 15:43:59 +03:00
2018-05-17 08:42:53 +03:00
2018-05-17 08:42:53 +03:00
2018-05-24 11:27:15 +03:00
2018-05-24 11:27:15 +03:00
2018-06-04 16:12:00 +03:00
2018-06-04 16:12:00 +03:00
2018-04-24 20:59:57 +03:00
2018-04-24 20:59:57 +03:00
2018-04-25 07:59:25 +03:00
2018-05-17 08:42:53 +03:00
2018-05-17 08:42:53 +03:00
2018-03-30 09:45:03 +02:00
2018-05-07 17:04:18 +10:00
2018-05-07 17:04:18 +10:00
2018-05-29 17:34:49 +03:00
2018-05-29 17:34:49 +03:00
2018-04-20 16:52:51 +05:30
2018-05-17 08:42:53 +03:00
2018-05-17 08:42:53 +03:00
2018-06-18 15:43:59 +03:00
2018-06-18 15:43:59 +03:00
2018-04-24 20:59:57 +03:00
2018-04-24 20:59:57 +03:00
2018-05-29 17:34:49 +03:00
2018-05-29 17:34:49 +03:00
2018-04-24 20:59:57 +03:00
2018-04-24 20:59:57 +03:00
2018-05-11 13:15:10 +02:00
2018-05-11 13:15:10 +02:00
2018-06-18 15:43:59 +03:00
2018-06-18 15:43:59 +03:00
2018-05-29 17:34:49 +03:00
2018-05-29 17:34:49 +03:00
2018-04-24 20:59:57 +03:00
2018-04-24 20:59:57 +03:00
2018-05-17 08:42:53 +03:00
2018-05-29 17:34:49 +03:00
2018-05-29 17:34:49 +03:00
2018-06-18 15:43:59 +03:00
2018-06-18 15:43:59 +03:00
2018-06-18 15:43:59 +03:00
2018-06-18 15:43:59 +03:00