From: Chris Hofstaedtler Date: Fri, 10 Aug 2018 12:46:05 +0000 (+0200) Subject: Workaround MariaDB pretending to be MySQL X-Git-Tag: auth-4.1.4^2~6^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8b48654914cf2f6fcc968c526810b95dded3c16;p=pdns Workaround MariaDB pretending to be MySQL (cherry picked from commit 7906a5d37203a8c3c4fb130d482442c3ba151e3b) --- diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index 8a2a5092a..12f2a175b 100644 --- a/modules/gmysqlbackend/smysql.cc +++ b/modules/gmysqlbackend/smysql.cc @@ -32,6 +32,12 @@ #include "pdns/namespaces.hh" #include "pdns/lock.hh" +#if MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_BASE_VERSION) +// Need to keep this for compatibility with MySQL < 8.0.0, which used typedef char my_bool; +// MariaDB up to 10.4 also always define it. +typedef bool my_bool; +#endif + bool SMySQL::s_dolog; pthread_mutex_t SMySQL::s_myinitlock = PTHREAD_MUTEX_INITIALIZER;