]> granicus.if.org Git - pdns/commitdiff
Workaround MariaDB pretending to be MySQL
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 10 Aug 2018 12:46:05 +0000 (14:46 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 20 Aug 2018 10:39:29 +0000 (12:39 +0200)
(cherry picked from commit 7906a5d37203a8c3c4fb130d482442c3ba151e3b)

modules/gmysqlbackend/smysql.cc

index 8a2a5092a3fc9c41c43dbc350289a477365cdb09..12f2a175b4ceb206db806c445e20497fbaaaea26 100644 (file)
 #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;