summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorDaniel Black <daniel@linux.ibm.com>2019-09-23 18:28:55 +1000
committerSergey Vojtovich <svoj@mariadb.org>2019-10-02 20:00:05 +0400
commit716c748f97d8f7cb7caaf39dd7b9cdaf79b2229a (patch)
treec6e5ea5d6bf7832d37ac73738cc513562a575011 /sql/sql_cache.cc
parent7e44c455f4de82081af5089e1f77378676aa45ff (diff)
downloadmariadb-git-716c748f97d8f7cb7caaf39dd7b9cdaf79b2229a.tar.gz
MDEV-20684: innodb/query cache use madvise CORE/NOCORE on FreeBSD
This applies to large allocations. This maps to the way Linux does it in MDEV-10814 except FreeBSD uses different constants. Adjust error string to match to implementation. Tested on FreeBSD-12.0
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index c44be9a11f5..70525725689 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -2662,7 +2662,7 @@ size_t Query_cache::init_cache()
#if defined(DBUG_OFF) && defined(HAVE_MADVISE) && defined(MADV_DONTDUMP)
if (madvise(cache, query_cache_size+additional_data_size, MADV_DONTDUMP))
{
- DBUG_PRINT("warning", ("coudn't mark query cache memory as MADV_DONTDUMP: %s",
+ DBUG_PRINT("warning", ("coudn't mark query cache memory as " DONTDUMP_STR ": %s",
strerror(errno)));
}
#endif
@@ -2831,7 +2831,7 @@ void Query_cache::free_cache()
#if defined(DBUG_OFF) && defined(HAVE_MADVISE) && defined(MADV_DODUMP)
if (madvise(cache, query_cache_size+additional_data_size, MADV_DODUMP))
{
- DBUG_PRINT("warning", ("coudn't mark query cache memory as MADV_DODUMP: %s",
+ DBUG_PRINT("warning", ("coudn't mark query cache memory as " DODUMP_STR ": %s",
strerror(errno)));
}
#endif