mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Bug#38002 table_cache consumes too much memory with blobs
Tables in the table definition cache are keeping a cache buffer for blob
fields which can consume a lot of memory.
This patch introduces a maximum size threshold for these buffers.
sql/sql_base.cc:
Added function free_field_buffers_larger_than to reclaim memory from blob
field buffers too large to be cached.
sql/table.cc:
Added function free_field_buffers_larger_than
This commit is contained in:
parent
a555716d44
commit
548413824b
5 changed files with 29 additions and 1 deletions
|
|
@ -13,7 +13,6 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
/*
|
||||
Because of the function new_field() all field classes that have static
|
||||
variables must declare the size_of() member function.
|
||||
|
|
@ -1669,6 +1668,7 @@ public:
|
|||
}
|
||||
int reset(void) { bzero(ptr, packlength+sizeof(uchar*)); return 0; }
|
||||
void reset_fields() { bzero((uchar*) &value,sizeof(value)); }
|
||||
uint32 get_field_buffer_size(void) { return value.alloced_length(); }
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
static
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue