From 2281fcf38a9f833e053d99564f0cd766e393dba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 16 Jan 2018 13:42:33 +0200 Subject: [PATCH] Follow-up fix to MDEV-14952 for Mariabackup innodb_init_param(): Initialize btr_ahi_parts=1 for Mariabackup. btr_search_enabled: Let the adaptive hash index be disabled in Mariabackup. This would potentially only matter during --export, and --export performs a table scan, not many index lookups. --- extra/mariabackup/xtrabackup.cc | 3 +++ storage/innobase/btr/btr0sea.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 20919cf3a81..d9149321702 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -1461,6 +1461,9 @@ innodb_init_param(void) srv_page_size = 0; srv_page_size_shift = 0; +#ifdef BTR_CUR_HASH_ADAPT + btr_ahi_parts = 1; +#endif /* BTR_CUR_HASH_ADAPT */ if (innobase_page_size != (1LL << 14)) { int n_shift = (int)get_bit_shift((ulint) innobase_page_size); diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc index 1a70dce1c7b..3ca50e00b42 100644 --- a/storage/innobase/btr/btr0sea.cc +++ b/storage/innobase/btr/btr0sea.cc @@ -45,7 +45,7 @@ Created 2/17/1996 Heikki Tuuri /** Is search system enabled. Search system is protected by array of latches. */ -char btr_search_enabled = true; +char btr_search_enabled; /** Number of adaptive hash index partition. */ ulong btr_ahi_parts;