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 /mysys/my_safehash.c | |
parent | 2ac3121af2767186c489054db5d4871d04b8eef4 (diff) | |
download | mariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz |
perfschema memory related instrumentation changes
Diffstat (limited to 'mysys/my_safehash.c')
-rw-r--r-- | mysys/my_safehash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mysys/my_safehash.c b/mysys/my_safehash.c index 7555f73fb30..39b73d603ef 100644 --- a/mysys/my_safehash.c +++ b/mysys/my_safehash.c @@ -102,7 +102,8 @@ my_bool safe_hash_init(SAFE_HASH *hash, uint elements, DBUG_ENTER("safe_hash_init"); if (my_hash_init(&hash->hash, &my_charset_bin, elements, 0, 0, (my_hash_get_key) safe_hash_entry_get, - (void (*)(void*)) safe_hash_entry_free, 0)) + (void (*)(void*)) safe_hash_entry_free, 0, + key_memory_SAFE_HASH_ENTRY)) { hash->default_value= 0; DBUG_RETURN(1); @@ -224,7 +225,8 @@ my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length, } else { - if (!(entry= (SAFE_HASH_ENTRY *) my_malloc(sizeof(*entry) + length, + if (!(entry= (SAFE_HASH_ENTRY *) my_malloc(key_memory_SAFE_HASH_ENTRY, + sizeof(*entry) + length, MYF(MY_WME)))) { error= 1; |