Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1
-
None
-
OS X 10.8
-
0de6c52bfe2433eca768a5f6fe9d5f08a545c254
Description
While using the QMYSQL plugin, open always returns true even if the server is unreachable (e.g. not running)
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("unreachable"); db.setPort(3306); db.setDatabaseName("test"); db.setUserName("username"); db.setPassword("password"); if (!db.open()) { qDebug() << "Failed to open database" << db.lastError().databaseText(); } else { qDebug() << "Success"; }
Attachments
Issue Links
- relates to
-
QTBUG-47452 QSqlDatabase crashes when can't connect
- Closed