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 | 5c1f8d1836554f6978b8fe84acb3e3e1f207bca1 (patch) | |
tree | 87fb26d4be11fe0d8b5ddd517de3bd328ea5b6fc /sql/field.h | |
parent | 58daa8d50a05e863ed6f24646b05d600070646af (diff) | |
download | mariadb-git-5c1f8d1836554f6978b8fe84acb3e3e1f207bca1.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.
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h index 7d312dbd2b8..8e00cf013dc 100644 --- a/sql/field.h +++ b/sql/field.h @@ -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 |