From 79f02998d5fee273db8185d077820ec91069eb1c Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Thu, 10 Dec 2020 19:13:23 +0200 Subject: [PATCH] MySQL library 8.x removed my_bool type. --- module/Library/MySQL.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/module/Library/MySQL.hpp b/module/Library/MySQL.hpp index f6fb09d4..0b8e0f3b 100644 --- a/module/Library/MySQL.hpp +++ b/module/Library/MySQL.hpp @@ -13,6 +13,7 @@ #include "Library/Chrono/Timestamp.hpp" // ------------------------------------------------------------------------------------------------ +#include #include // ------------------------------------------------------------------------------------------------ @@ -300,7 +301,11 @@ public: // -------------------------------------------------------------------------------------------- typedef MYSQL_BIND BindType; // Database bind type. typedef MYSQL_TIME TimeType; // Database time type. +#if defined(MYSQL_VERSION_ID) && (MYSQL_VERSION_ID < 80000) typedef my_bool BoolType; // Database boolean type. +#else + typedef _Bool BoolType; // Database boolean type. +#endif public: @@ -395,7 +400,11 @@ public: // -------------------------------------------------------------------------------------------- typedef MYSQL_BIND BindType; // Database bind type. typedef MYSQL_TIME TimeType; // Database time type. +#if defined(MYSQL_VERSION_ID) && (MYSQL_VERSION_ID < 80000) typedef my_bool BoolType; // Database boolean type. +#else + typedef _Bool BoolType; // Database boolean type. +#endif public: @@ -485,7 +494,11 @@ public: typedef MYSQL_BIND BindType; // Database bind type. typedef MYSQL_TIME TimeType; // Database time type. typedef MYSQL_ROW RowType; // Database row type. +#if defined(MYSQL_VERSION_ID) && (MYSQL_VERSION_ID < 80000) typedef my_bool BoolType; // Database boolean type. +#else + typedef _Bool BoolType; // Database boolean type. +#endif // -------------------------------------------------------------------------------------------- typedef std::unordered_map< String, Uint32 > IndexMap; @@ -585,7 +598,11 @@ public: typedef MYSQL_BIND BindType; // Database bind type. typedef MYSQL_TIME TimeType; // Database time type. typedef MYSQL_ROW RowType; // Database row type. +#if defined(MYSQL_VERSION_ID) && (MYSQL_VERSION_ID < 80000) typedef my_bool BoolType; // Database boolean type. +#else + typedef _Bool BoolType; // Database boolean type. +#endif // -------------------------------------------------------------------------------------------- typedef std::unordered_map< String, Uint32 > IndexMap; // Name to index association of fields.