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 /storage/myisam/mi_packrec.c | |
parent | 2ac3121af2767186c489054db5d4871d04b8eef4 (diff) | |
download | mariadb-git-7c58e97bf6f80a251046c5b3e7bce826fe058bd6.tar.gz |
perfschema memory related instrumentation changes
Diffstat (limited to 'storage/myisam/mi_packrec.c')
-rw-r--r-- | storage/myisam/mi_packrec.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c index b28eaf21090..637b1e69bfd 100644 --- a/storage/myisam/mi_packrec.c +++ b/storage/myisam/mi_packrec.c @@ -195,8 +195,8 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys) - Distinct column values */ if (!(share->decode_trees=(MI_DECODE_TREE*) - my_malloc((uint) (trees*sizeof(MI_DECODE_TREE)+ - intervall_length*sizeof(uchar)), + my_malloc(mi_key_memory_MI_DECODE_TREE, + trees*sizeof(MI_DECODE_TREE) + intervall_length*sizeof(uchar), MYF(MY_WME)))) goto err0; intervall_buff=(uchar*) (share->decode_trees+trees); @@ -218,7 +218,8 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys) data, we add (BITS_SAVED / 8) - 1 bytes to the buffer size. */ if (!(share->decode_tables=(uint16*) - my_malloc((length + OFFSET_TABLE_SIZE) * sizeof(uint16) + + my_malloc(mi_key_memory_MYISAM_SHARE_decode_tables, + (length + OFFSET_TABLE_SIZE) * sizeof(uint16) + (uint) (share->pack.header_length - sizeof(header) + (BITS_SAVED / 8) - 1), MYF(MY_WME | MY_ZEROFILL)))) goto err1; @@ -258,9 +259,10 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys) goto err3; /* Reallocate the decoding tables to the used size. */ decode_table=(uint16*) - my_realloc((uchar*) share->decode_tables, + my_realloc(mi_key_memory_MYISAM_SHARE_decode_tables, + (uchar*) share->decode_tables, (uint) ((uchar*) decode_table - (uchar*) share->decode_tables), - MYF(MY_HOLD_ON_ERROR)); + MYF(0)); /* Fix the table addresses in the tree heads. */ { my_ptrdiff_t diff=PTR_BYTE_DIFF(decode_table,share->decode_tables); |