summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-02-20 16:23:18 +0200
committerMichael Widenius <monty@askmonty.org>2012-02-20 16:23:18 +0200
commitae07ec6cbf08e311e538f5149f93385e5bcaa7a6 (patch)
tree4f2dee1467f3c3e3bd8feb6ffb7adf7684bdc653 /storage/myisam
parent0c568a99dfe3e528ec5bd09dfe0f2f90acb52db4 (diff)
parentdacaaf22a3f132df5573fe8e58c0617c30c5e9fc (diff)
downloadmariadb-git-ae07ec6cbf08e311e538f5149f93385e5bcaa7a6.tar.gz
Merge with MYSQL 5.1.61
Fixed README with link to source Merged InnoDB change to XtraDB README: Added information of where to find MariaDB code storage/archive/ha_archive.cc: Removed memset() of rows, a MariaDB checksum's doesn't touch not used data.
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_close.c7
-rw-r--r--storage/myisam/mi_packrec.c7
-rw-r--r--storage/myisam/mi_preload.c3
3 files changed, 13 insertions, 4 deletions
diff --git a/storage/myisam/mi_close.c b/storage/myisam/mi_close.c
index d3888417fbd..56e66cccf7d 100644
--- a/storage/myisam/mi_close.c
+++ b/storage/myisam/mi_close.c
@@ -89,7 +89,12 @@ int mi_close(register MI_INFO *info)
}
#ifdef HAVE_MMAP
if (share->file_map)
- _mi_unmap_file(info);
+ {
+ if (share->options & HA_OPTION_COMPRESS_RECORD)
+ _mi_unmap_file(info);
+ else
+ mi_munmap_file(info);
+ }
#endif
if (share->decode_trees)
{
diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c
index 7b90ba8276b..dde3817c5e2 100644
--- a/storage/myisam/mi_packrec.c
+++ b/storage/myisam/mi_packrec.c
@@ -1554,13 +1554,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)
{
pthread_mutex_lock(&THR_LOCK_myisam_mmap);
- myisam_mmap_used-= info->s->mmaped_length + MEMMAP_EXTRA_MARGIN;
+ myisam_mmap_used-= info->s->mmaped_length;
pthread_mutex_unlock(&THR_LOCK_myisam_mmap);
}
}
diff --git a/storage/myisam/mi_preload.c b/storage/myisam/mi_preload.c
index cb8d2984921..b5594f63d47 100644
--- a/storage/myisam/mi_preload.c
+++ b/storage/myisam/mi_preload.c
@@ -56,6 +56,9 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
if (!keys || !mi_is_any_key_active(key_map) || key_file_length == pos)
DBUG_RETURN(0);
+ /* Preload into a non initialized key cache should never happen. */
+ DBUG_ASSERT(share->key_cache->key_cache_inited);
+
block_length= keyinfo[0].block_length;
if (ignore_leaves)