summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-27 16:11:52 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-27 16:11:52 (GMT)
commit63e89c45fcc07759c928231ac27cc25928116d45 (patch)
tree9e132af6086f51db41c00122ac2249a2accbc384
parent3f094a3c7cabd1fe26f59f5843751619ea0b626a (diff)
parentc0ca29efdeb442a6b88ccadff409e3f7ef828ce8 (diff)
downloadQt-63e89c45fcc07759c928231ac27cc25928116d45.zip
Qt-63e89c45fcc07759c928231ac27cc25928116d45.tar.gz
Qt-63e89c45fcc07759c928231ac27cc25928116d45.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed QTBUG-11935 : "With MySQL version > 50000 the QMYSQLDriver:: Fixed QTBUG-11935
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index 495b1a6..441e355 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -1374,12 +1374,16 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const
} else {
QSqlQuery q(createResult());
if(type & QSql::Tables) {
- q.exec(QLatin1String("select table_name from information_schema.tables where table_type = 'BASE TABLE'"));
+ QString sql = QLatin1String("select table_name from information_schema.tables where table_schema = '") + QLatin1String(d->mysql->db) + QLatin1String("' and table_type = 'BASE TABLE'");
+ q.exec(sql);
+
while(q.next())
tl.append(q.value(0).toString());
}
if(type & QSql::Views) {
- q.exec(QLatin1String("select table_name from information_schema.tables where table_type = 'VIEW'"));
+ QString sql = QLatin1String("select table_name from information_schema.tables where table_schema = '") + QLatin1String(d->mysql->db) + QLatin1String("' and table_type = 'VIEW'");
+ q.exec(sql);
+
while(q.next())
tl.append(q.value(0).toString());
}