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/table.h | |
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/table.h')
-rw-r--r-- | sql/table.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h index 75ddaf69c10..da0e089794f 100644 --- a/sql/table.h +++ b/sql/table.h @@ -935,6 +935,9 @@ typedef struct st_schema_table #define VIEW_CHECK_ERROR 1 #define VIEW_CHECK_SKIP 2 +/** The threshold size a blob field buffer before it is freed */ +#define MAX_TDC_BLOB_SIZE 65536 + struct st_lex; class select_union; class TMP_TABLE_PARAM; |