mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Disable mmap usage in Aria and MyISAM when compiling with valgrind
This removes a valgrind warning "cannot read program header" while it tries to search for memory leaks.
This commit is contained in:
parent
fd9a11d8a5
commit
cc5d738999
2 changed files with 6 additions and 6 deletions
|
@ -74,7 +74,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
|
|||
}
|
||||
if (info->s->file_map) /* Don't use cache if mmap */
|
||||
break;
|
||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
|
||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) && !defined(HAVE_valgrind)
|
||||
if ((share->options & HA_OPTION_COMPRESS_RECORD))
|
||||
{
|
||||
mysql_mutex_lock(&share->intern_lock);
|
||||
|
@ -162,7 +162,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
|
|||
error= end_io_cache(&info->rec_cache);
|
||||
/* Sergei will insert full text index caching here */
|
||||
}
|
||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
|
||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) && !defined(HAVE_valgrind)
|
||||
if (info->opt_flag & MEMMAP_USED)
|
||||
madvise((char*) share->file_map, share->state.state.data_file_length,
|
||||
MADV_RANDOM);
|
||||
|
@ -456,7 +456,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
|
|||
maria_extra_keyflag(info, function);
|
||||
break;
|
||||
case HA_EXTRA_MMAP:
|
||||
#ifdef HAVE_MMAP
|
||||
#if defined(HAVE_MMAP) && !defined(HAVE_valgrind)
|
||||
if (block_records)
|
||||
break; /* Not supported */
|
||||
mysql_mutex_lock(&share->intern_lock);
|
||||
|
|
|
@ -69,7 +69,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
|
|||
}
|
||||
if (info->s->file_map) /* Don't use cache if mmap */
|
||||
break;
|
||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
|
||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) && !defined(HAVE_valgrind)
|
||||
if ((share->options & HA_OPTION_COMPRESS_RECORD))
|
||||
{
|
||||
mysql_mutex_lock(&share->intern_lock);
|
||||
|
@ -155,7 +155,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
|
|||
error=end_io_cache(&info->rec_cache);
|
||||
/* Sergei will insert full text index caching here */
|
||||
}
|
||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
|
||||
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE) && !defined(HAVE_valgrind)
|
||||
if (info->opt_flag & MEMMAP_USED)
|
||||
madvise((char*) share->file_map, share->state.state.data_file_length,
|
||||
MADV_RANDOM);
|
||||
|
@ -320,7 +320,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
|
|||
mi_extra_keyflag(info, function);
|
||||
break;
|
||||
case HA_EXTRA_MMAP:
|
||||
#ifdef HAVE_MMAP
|
||||
#if defined(HAVE_MMAP) && !defined(HAVE_valgrind)
|
||||
mysql_mutex_lock(&share->intern_lock);
|
||||
/*
|
||||
Memory map the data file if it is not already mapped. It is safe
|
||||
|
|
Loading…
Reference in a new issue