diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-01-29 13:50:26 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-03-10 19:24:22 +0100 |
commit | 7c58e97bf6f80a251046c5b3e7bce826fe058bd6 (patch) | |
tree | 7d32d26b320cf83296ee0ede2ea164ad116c4de8 /sql/sql_join_cache.cc | |
parent | 2ac3121af2767186c489054db5d4871d04b8eef4 (diff) | |
download | mariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz |
perfschema memory related instrumentation changes
Diffstat (limited to 'sql/sql_join_cache.cc')
-rw-r--r-- | sql/sql_join_cache.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 3a509b3d750..9c681061118 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -937,7 +937,8 @@ int JOIN_CACHE::alloc_buffer() { size_t next_buff_size; - if ((buff= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC)))) + if ((buff= (uchar*) my_malloc(key_memory_JOIN_CACHE, buff_size, + MYF(MY_THREAD_SPECIFIC)))) break; next_buff_size= buff_size > buff_size_decr ? buff_size-buff_size_decr : 0; @@ -1013,11 +1014,11 @@ bool JOIN_CACHE::shrink_join_buffer_in_ratio(ulonglong n, ulonglong d) int JOIN_CACHE::realloc_buffer() { - int rc; free(); - rc= MY_TEST(!(buff= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC)))); + buff= (uchar*) my_malloc(key_memory_JOIN_CACHE, buff_size, + MYF(MY_THREAD_SPECIFIC)); reset(TRUE); - return rc; + return buff == NULL; } @@ -2809,12 +2810,12 @@ int JOIN_CACHE_HASHED::init_hash_table() int JOIN_CACHE_HASHED::realloc_buffer() { - int rc; free(); - rc= MY_TEST(!(buff= (uchar*) my_malloc(buff_size, MYF(MY_THREAD_SPECIFIC)))); + buff= (uchar*) my_malloc(key_memory_JOIN_CACHE, buff_size, + MYF(MY_THREAD_SPECIFIC)); init_hash_table(); reset(TRUE); - return rc; + return buff == NULL; } |