diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2009-09-08 00:50:10 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2009-09-08 00:50:10 +0400 |
commit | 29f0dcb56337a3e352ad7a70dcff6b25bb605325 (patch) | |
tree | 84935c21dc958724ae7dcbeeca0c0f08986fc430 /storage/myisam/mi_dynrec.c | |
parent | 915a624cbcb58a10a2cfb2e2e4fd5029191fa86a (diff) | |
parent | 8a2454f8e9fce648272577fcf8006ae6e6806cf9 (diff) | |
download | mariadb-git-29f0dcb56337a3e352ad7a70dcff6b25bb605325.tar.gz |
Merge MySQL->MariaDB
* Finished Monty and Jani's merge
* Some InnoDB tests still fail (because it's old xtradb code run against
newer testsuite). They are expected to go after mergning with the latest
xtradb.
Diffstat (limited to 'storage/myisam/mi_dynrec.c')
-rw-r--r-- | storage/myisam/mi_dynrec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c index 3a5956abb7e..d2ff91a45f3 100644 --- a/storage/myisam/mi_dynrec.c +++ b/storage/myisam/mi_dynrec.c @@ -66,7 +66,7 @@ static int _mi_cmp_buffer(File file, const uchar *buff, my_off_t filepos, my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) { DBUG_ENTER("mi_dynmap_file"); - if (size > (my_off_t) (~((size_t) 0)) - MEMMAP_EXTRA_MARGIN) + if (size > (my_off_t) (~((size_t) 0))) { DBUG_PRINT("warning", ("File is too large for mmap")); DBUG_RETURN(1); @@ -80,7 +80,7 @@ my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) upon a write if no physical memory is available. */ info->s->file_map= (uchar*) - my_mmap(0, (size_t)(size + MEMMAP_EXTRA_MARGIN), + my_mmap(0, (size_t) size, info->s->mode==O_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NORESERVE, @@ -113,7 +113,7 @@ void mi_remap_file(MI_INFO *info, my_off_t size) if (info->s->file_map) { VOID(my_munmap((char*) info->s->file_map, - (size_t) info->s->mmaped_length + MEMMAP_EXTRA_MARGIN)); + (size_t) info->s->mmaped_length)); mi_dynmap_file(info, size); } } |