diff options
author | Kristofer Pettersson <kpettersson@mysql.com> | 2008-07-24 22:38:44 +0200 |
---|---|---|
committer | Kristofer Pettersson <kpettersson@mysql.com> | 2008-07-24 22:38:44 +0200 |
commit | 548413824b85fa0550c8d9a297546b80ed1643e1 (patch) | |
tree | 87fb26d4be11fe0d8b5ddd517de3bd328ea5b6fc /sql/sql_base.cc | |
parent | a555716d444a5aa11e2d600f4fac98b210137d13 (diff) | |
download | mariadb-git-548413824b85fa0550c8d9a297546b80ed1643e1.tar.gz |
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
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d25057789ac..39dd815e738 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1369,6 +1369,8 @@ bool close_thread_table(THD *thd, TABLE **table_ptr) DBUG_ASSERT(!table->is_children_attached()); /* Free memory and reset for next loop */ + free_field_buffers_larger_than(table,MAX_TDC_BLOB_SIZE); + table->file->ha_reset(); table->in_use=0; if (unused_tables) |