summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/sqldrivers/mysql')
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index 7c0e270923..a1636302b7 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -74,9 +74,9 @@ Q_DECLARE_METATYPE(MYSQL_STMT*)
# define Q_CLIENT_MULTI_STATEMENTS 0
#endif
-#if MYSQL_VERSION_ID >= 80001
-using my_bool = bool;
-#endif
+// MySQL above version 8 removed my_bool typedef while MariaDB kept it,
+// by redefining it we can regain source compatibility.
+using my_bool = decltype(mysql_stmt_bind_result(nullptr, nullptr));
QT_BEGIN_NAMESPACE