2022-12-21 Fred Gleason <fredg@paravelsystems.com>

* Added the database server hostname to the summary output of
	rddbmgr(8).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-12-21 14:25:18 -05:00
parent a1bdaef361
commit 71aca2b82b
2 changed files with 9 additions and 4 deletions

View File

@@ -45,14 +45,16 @@ bool MainObject::PrintStatus(QString *err_msg) const
"from `SYSTEM`";
q=new RDSqlQuery(sql);
if(q->first()) {
printf("Rivendell database, schema %d [%s] (%s)\n",schema,
printf("Rivendell database, schema %d [%s] (%s @ %s)\n",schema,
GetSchemaVersion(schema).toUtf8().constData(),
q->value(0).toString().toUtf8().constData());
q->value(0).toString().toUtf8().constData(),
db_mysql_hostname.toUtf8().constData());
}
else {
fprintf(stderr,"rddbmgr: WARNING - unable to read Realm value.\n");
printf("Rivendell database, schema %d [%s]\n",schema,
GetSchemaVersion(schema).toUtf8().constData());
printf("Rivendell database, schema %d [%s] (@ %s)\n",schema,
GetSchemaVersion(schema).toUtf8().constData(),
db_mysql_hostname.toUtf8().constData());
}
delete q;
}