Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.2
-
None
-
c0ca29efdeb442a6b88ccadff409e3f7ef828ce8
Description
Expected would be that only tables in the database we are currently connected to are listed.
Example reproducing the problem
#include <QtCore> #include <QtSql> int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("localhost"); db.setDatabaseName("nic"); db.open("", ""); if (db.isOpen()) foreach(QString str, db.tables()) qDebug() << str; else qDebug() << db.lastError().text(); return app.exec(); }