diff options
author | Samuel Gaist <samuel.gaist@idiap.ch> | 2018-07-11 23:59:15 +0200 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@idiap.ch> | 2018-07-19 13:00:16 +0000 |
commit | 82b4c79fb90c1a01165b96455ae48715c3059bbe (patch) | |
tree | 45dc6dd2d900fc33c67a56b0341be4b99e5371e7 /src/plugins/sqldrivers | |
parent | ff18b02f21a04f7092b58be04be5a40df3ef993b (diff) |
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
<stdbool.h>. 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 <edward.welbourne@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers')
-rw-r--r-- | src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 |