diff options
author | Mattias Jonsson <mattias.jonsson@oracle.com> | 2012-08-15 14:31:26 +0200 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@oracle.com> | 2012-08-15 14:31:26 +0200 |
commit | bcee9f1896ab6015e77ea88fde5317f50edaead7 (patch) | |
tree | e7ca7e7a169f2abfe58034ccf619d538574434ca /sql/unireg.h | |
parent | 03bfc41bb83210ae4bdf16e6650f6168a2111ac0 (diff) | |
download | mariadb-git-bcee9f1896ab6015e77ea88fde5317f50edaead7.tar.gz |
Bug#13025132 - PARTITIONS USE TOO MUCH MEMORY
The buffer for the current read row from each partition
(m_ordered_rec_buffer) used for sorted reads was
allocated on open and freed when the ha_partition handler
was closed or destroyed.
For tables with many partitions and big records this could
take up too much valuable memory.
Solution is to only allocate the memory when it is needed
and free it when nolonger needed. I.e. allocate it in
index_init and free it in index_end (and to handle failures
also free it on reset, close etc.)
Also only allocating needed memory, according to
partitioning pruning.
Manually tested that it does not use as much memory and
releases it after queries.
Diffstat (limited to 'sql/unireg.h')
0 files changed, 0 insertions, 0 deletions