Fix the logic for MariaDB 10.0 upgrade.