Fix for segfault in Database::CheckStatus() when using MariaDB.