summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_packrec.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisam/mi_packrec.c')
-rw-r--r--storage/myisam/mi_packrec.c12
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);