. ${GRIMOIRE}/FUNCTIONS &&

#
# This block is required for proper configuration procedure for users with 5.2
# branch installed after adding multiversion functionality to the spell and
# prevents previous branch from resetting to a new default value on ``cast -r''
#
persistent_read $SPELL MARIADB_BRANCH MARIADB_BRANCH || true &&

if spell_ok $SPELL && [[ -z "$MARIADB_BRANCH" ]]; then
  persistent_add MARIADB_BRANCH &&
  local MARIADB_BRANCH="5.2"
fi &&

prepare_select_branch 10.1 5.5 5.3 5.2 &&

config_query MARIA_TESTS "Install MariaDB testing utilities?" n &&
config_query MARIA_BENCH "Install MariaDB benchmarking utilities?" n
