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/hash.c | |
parent | 2ac3121af2767186c489054db5d4871d04b8eef4 (diff) | |
download | mariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz |
perfschema memory related instrumentation changes
Diffstat (limited to 'mysys/hash.c')
-rw-r--r-- | mysys/hash.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mysys/hash.c b/mysys/hash.c index ba2aa8fc30e..ddb146af5e0 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -80,7 +80,7 @@ my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset, ulong size, size_t key_offset, size_t key_length, my_hash_get_key get_key, my_hash_function hash_function, - void (*free_element)(void*), uint flags) + void (*free_element)(void*), uint flags, PSI_memory_key psi_key) { my_bool res; DBUG_ENTER("my_hash_init2"); @@ -95,7 +95,7 @@ my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset, hash->free=free_element; hash->flags=flags; hash->charset=charset; - res= init_dynamic_array2(&hash->array, sizeof(HASH_LINK), NULL, size, + res= init_dynamic_array2(&hash->array, psi_key, sizeof(HASH_LINK), NULL, size, growth_size, MYF((flags & HASH_THREAD_SPECIFIC ? MY_THREAD_SPECIFIC : 0))); DBUG_RETURN(res); @@ -890,7 +890,8 @@ int main(int argc __attribute__((unused)),char **argv __attribute__((unused))) printf("my_hash_init\n"); if (my_hash_init2(&hash_test, 100, &my_charset_bin, 20, - 0, 0, (my_hash_get_key) test_get_key, 0, 0, HASH_UNIQUE)) + 0, 0, (my_hash_get_key) test_get_key, 0, 0, HASH_UNIQUE, + PSI_INSTRUMENT_ME)) { fprintf(stderr, "hash init failed\n"); exit(1); |