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>
bb10
Samuel Gaist 2018-07-11 23:59:15 +02:00
parent ff18b02f21
commit 82b4c79fb9
1 changed files with 4 additions and 0 deletions

View File

@ -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