summaryrefslogtreecommitdiff
path: root/isam
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-08-31 10:08:55 -0700
committerunknown <jimw@mysql.com>2005-08-31 10:08:55 -0700
commitb34af8cde47ec0168b5878988b791cbc69dc65b4 (patch)
treec1f9152e88243517c07aabc96a903ee85dc2a24c /isam
parent7b8ab0e1cff25108f3b044189db879fd39073290 (diff)
downloadmariadb-git-b34af8cde47ec0168b5878988b791cbc69dc65b4.tar.gz
Add test for madvise() being declared in C++ code, because it is not
on Solaris even though it is available, and declare it ourselves in that case. (Bug #7156) configure.in: Add test for madvise() being declared when C++ compiler is used. include/my_global.h: Handle madvise() being available but not declared in C++ isam/extra.c: Fix typo in define test myisam/mi_extra.c: Fix typo in define test sql/examples/ha_tina.cc: Test that we have madvise() before trying to call it.
Diffstat (limited to 'isam')
-rw-r--r--isam/extra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/isam/extra.c b/isam/extra.c
index 421404311c8..0d15cd948bb 100644
--- a/isam/extra.c
+++ b/isam/extra.c
@@ -67,7 +67,7 @@ int nisam_extra(N_INFO *info, enum ha_extra_function function)
break;
}
#endif
-#if defined(HAVE_MMAP) && defined(HAVE_MADVICE)
+#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
if ((info->options & HA_OPTION_COMPRESS_RECORD))
{
pthread_mutex_lock(&info->s->intern_lock);
@@ -144,7 +144,7 @@ int nisam_extra(N_INFO *info, enum ha_extra_function function)
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
error=end_io_cache(&info->rec_cache);
}
-#if defined(HAVE_MMAP) && defined(HAVE_MADVICE)
+#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
if (info->opt_flag & MEMMAP_USED)
madvise(info->s->file_map,info->s->state.data_file_length,MADV_RANDOM);
#endif