diff options
author | Bill King <bill.king@nokia.com> | 2009-09-02 22:35:02 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-09-02 22:35:02 (GMT) |
commit | 019aee9485059fff44a8bed1207da10c6be1cede (patch) | |
tree | 402a2bd91e3c15c8eca401ce375b467dd59be3c3 | |
parent | b7b8a6c4665cf39334635e7b44a538572dc53a34 (diff) | |
download | Qt-019aee9485059fff44a8bed1207da10c6be1cede.zip Qt-019aee9485059fff44a8bed1207da10c6be1cede.tar.gz Qt-019aee9485059fff44a8bed1207da10c6be1cede.tar.bz2 |
Fixes build with older versions of mysql client
-rw-r--r-- | src/sql/drivers/mysql/qsql_mysql.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |