QSqlDatabase open always returns true after update
After updating Qt from 5.5 to 5.6 QSqlDatabase:open always returns true - even if the host is not reachable and/or username/password/database settings are set to nonsense. Test code: QSqlDatabase* db = new QSqlDatabase(QSqlDatabase::addDatabase("QMYSQL", "TESTCONNECTION")); db->setHostName(ip); db->setPort(port); db->setUserName(user); db->setPassword(pwd); db->setDatabaseName(dbName); db->setConnectOptions("MYSQL_OPT_CONNECT_TIMEOUT=4"); bool ok = db->open(); I compiled the Qt sql libs against the latest mysql version (5.6.x). This was actually a reported bug: QSqlDatabase::open always