From 82b4c79fb90c1a01165b96455ae48715c3059bbe Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Wed, 11 Jul 2018 23:59:15 +0200 Subject: MySQL: handle my_bool for newer versions of MySQL Since MySQL 8.0.1 the my_bool type has been removed because all the C compilers supported by the project supports C99 which has bool through . This patch makes the driver both forward and backward compatible. [ChangeLog][QtSQL][MySQL] Now supports MySQL versions >= 8.0.1. Change-Id: Ib373992763643bd470d33e85ce5cec7e4ae5e895 Reviewed-by: Edward Welbourne --- src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp index 9c6c3ff429..7c0e270923 100644 --- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp @@ -74,6 +74,10 @@ Q_DECLARE_METATYPE(MYSQL_STMT*) # define Q_CLIENT_MULTI_STATEMENTS 0 #endif +#if MYSQL_VERSION_ID >= 80001 +using my_bool = bool; +#endif + QT_BEGIN_NAMESPACE class QMYSQLDriverPrivate : public QSqlDriverPrivate -- cgit v1.2.3