Fixed #169.
This commit is contained in:
parent
a6479b2603
commit
7d4fc503a1
@ -13,6 +13,7 @@ Added:
|
||||
|
||||
Fixed:
|
||||
|
||||
▪ Better detection of MySQL server status. (bug #169)
|
||||
▪ Ordering of messages is now done on SQL server (stands for both MySQL and SQLite). (bug #172)
|
||||
▪ Now title of the RSS/ATOM message is taken into account when deciding message "uniqueness". (bug #171)
|
||||
▪ MySQL scripts improved. (bug #170)
|
||||
|
@ -106,9 +106,19 @@ DatabaseFactory::MySQLError DatabaseFactory::mysqlTestConnection(const QString &
|
||||
database.setDatabaseName(w_database);
|
||||
|
||||
if (database.open() && !database.lastError().isValid()) {
|
||||
// Connection succeeded, clean up the mess and return OK status.
|
||||
database.close();
|
||||
return MySQLOk;
|
||||
QSqlQuery query(QSL("SELECT version();"), database);
|
||||
|
||||
if (!query.lastError().isValid() && query.next()) {
|
||||
qDebug("Checked MySQL database, version is '%s'.", qPrintable(query.value(0).toString()));
|
||||
|
||||
// Connection succeeded, clean up the mess and return OK status.
|
||||
database.close();
|
||||
return MySQLOk;
|
||||
}
|
||||
else {
|
||||
database.close();
|
||||
return MySQLUnknownError;
|
||||
}
|
||||
}
|
||||
else if (database.lastError().isValid()) {
|
||||
// Connection failed, do cleanup and return specific error code.
|
||||
|
Loading…
x
Reference in New Issue
Block a user