diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2012-10-04 16:15:13 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2012-10-04 16:15:13 +0200 |
commit | 6c0b206570ed47b3a86c53d5b6cfd5d4fdff2ccc (patch) | |
tree | cfc04b7846d4672b0ec88a3d9e95830cfc41ff31 /sql/sql_acl.cc | |
parent | d68d303118b9b6db9a2975ab04d688f8296b3ec3 (diff) | |
download | mariadb-git-6c0b206570ed47b3a86c53d5b6cfd5d4fdff2ccc.tar.gz |
Bug#14640599 MEMORY LEAK WHEN EXECUTING STORED ROUTINE EXCEPTION HANDLER
When a SP handler is activated, memory is allocated to hold the
MESSAGE_TEXT for the condition that caused the activation.
The problem was that this memory was allocated on the MEM_ROOT belonging
to the stored program. Since this MEM_ROOT is not freed until the
stored program ends, a stored program that causes lots of handler
activations can start using lots of memory. In 5.1 and earlier the
problem did not exist as no MESSAGE_TEXT was allocated if a condition
was raised with a handler present. However, this behavior lead to
a number of other issues such as Bug#23032.
This patch fixes the problem by allocating enough memory for the
necessary MESSAGE_TEXTs in the SP MEM_ROOT when the SP starts and
then re-using this memory each time a handler is activated.
This is the 5.5 version of the patch.
Diffstat (limited to 'sql/sql_acl.cc')
0 files changed, 0 insertions, 0 deletions