From 019aee9485059fff44a8bed1207da10c6be1cede Mon Sep 17 00:00:00 2001 From: Bill King Date: Thu, 3 Sep 2009 08:35:02 +1000 Subject: Fixes build with older versions of mysql client --- src/sql/drivers/mysql/qsql_mysql.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index b29e742..097ecbf 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -1310,8 +1310,10 @@ QSqlResult *QMYSQLDriver::createResult() const QStringList QMYSQLDriver::tables(QSql::TableType type) const { QStringList tl; +#if MYSQL_VERSION_ID >= 40100 if( mysql_get_server_version(d->mysql) < 50000) { +#endif if (!isOpen()) return tl; if (!(type & QSql::Tables)) @@ -1329,6 +1331,7 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const i++; } mysql_free_result(tableRes); +#if MYSQL_VERSION_ID >= 40100 } else { QSqlQuery q(createResult()); if(type & QSql::Tables) { @@ -1342,6 +1345,7 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const tl.append(q.value(0).toString()); } } +#endif return tl; } -- cgit v0.12