diff options
author | Nirbhay Choubey <nirbhay.choubey@oracle.com> | 2011-11-29 19:31:51 +0530 |
---|---|---|
committer | Nirbhay Choubey <nirbhay.choubey@oracle.com> | 2011-11-29 19:31:51 +0530 |
commit | 756416f64548a365feae482cb0471149462b3585 (patch) | |
tree | f55b3f45cde6517737cb525a81fad679e1808d13 /storage/myisam/mi_packrec.c | |
parent | a2248579d1830de1714aa8637dc2a1775660ee2e (diff) | |
parent | c67a91f11afd730ab050e3c5da16411b95c325a7 (diff) | |
download | mariadb-git-756416f64548a365feae482cb0471149462b3585.tar.gz |
Merge of patch for bug#11756764 from mysql-5.1.
Diffstat (limited to 'storage/myisam/mi_packrec.c')
-rw-r--r-- | storage/myisam/mi_packrec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c index 3d9acd45106..33c6d55e6ad 100644 --- a/storage/myisam/mi_packrec.c +++ b/storage/myisam/mi_packrec.c @@ -1549,13 +1549,14 @@ my_bool _mi_memmap_file(MI_INFO *info) void _mi_unmap_file(MI_INFO *info) { - (void) my_munmap((char*) info->s->file_map, - (size_t) info->s->mmaped_length + MEMMAP_EXTRA_MARGIN); + DBUG_ASSERT(info->s->options & HA_OPTION_COMPRESS_RECORD); + + (void) my_munmap((char*) info->s->file_map, (size_t) info->s->mmaped_length); if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); - myisam_mmap_used-= info->s->mmaped_length + MEMMAP_EXTRA_MARGIN; + myisam_mmap_used-= info->s->mmaped_length; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } } |