summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-02-06 10:50:04 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-02-06 10:50:04 +0200
commitebbc572b828007e519aee8595dd98938aa2d2f9d (patch)
treee26a3a93f89af324f57d76149c1aaec7ff85a6c9 /storage/innobase
parent236aed3f5f036ee31fc9f689dbbe0d8ddf033e97 (diff)
downloadmariadb-git-ebbc572b828007e519aee8595dd98938aa2d2f9d.tar.gz
MDEV-12121: Clean up WITH_INNODB_AHI=OFF
buf_flush_or_remove_pages(): Only define BUF_LRU_DROP_SEARCH_SIZE and dependent code when the adaptive hash index has been enabled.
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/buf/buf0lru.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc
index 8673c8d9d72..9feebd9a08e 100644
--- a/storage/innobase/buf/buf0lru.cc
+++ b/storage/innobase/buf/buf0lru.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -62,6 +62,7 @@ static const ulint BUF_LRU_OLD_TOLERANCE = 20;
# error "BUF_LRU_NON_OLD_MIN_LEN >= BUF_LRU_OLD_MIN_LEN"
#endif
+#ifdef BTR_CUR_HASH_ADAPT
/** When dropping the search hash index entries before deleting an ibd
file, we build a local array of pages belonging to that tablespace
in the buffer pool. Following is the size of that array.
@@ -70,6 +71,7 @@ flush_list when dropping a table. This is to ensure that other threads
are not blocked for extended period of time when using very large
buffer pools. */
static const ulint BUF_LRU_DROP_SEARCH_SIZE = 1024;
+#endif /* BTR_CUR_HASH_ADAPT */
/** We scan these many blocks when looking for a clean page to evict
during LRU eviction. */
@@ -379,7 +381,6 @@ drop_ahi:
return true;
}
-#endif /* BTR_CUR_HASH_ADAPT */
/******************************************************************//**
While flushing (or removing dirty) pages from a tablespace we don't
@@ -468,6 +469,7 @@ buf_flush_try_yield(
return(false);
}
+#endif /* BTR_CUR_HASH_ADAPT */
/******************************************************************//**
Removes a single page from a given tablespace inside a specific
@@ -643,6 +645,7 @@ rescan:
goto rescan;
}
+#ifdef BTR_CUR_HASH_ADAPT
++processed;
/* Yield if we have hogged the CPU and mutexes for too long. */
@@ -652,6 +655,7 @@ rescan:
processed = 0;
}
+#endif /* BTR_CUR_HASH_ADAPT */
/* The check for trx is interrupted is expensive, we want
to check every N iterations. */