2022-09-29 Fred Gleason <fredg@paravelsystems.com>

* Modified rddbmgr(8) to include the Realm name in its default
	output.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-09-29 13:51:05 -04:00
parent f89da24a55
commit 5f45045849
2 changed files with 25 additions and 4 deletions

View File

@@ -23412,3 +23412,6 @@
package.
2022-09-28 Fred Gleason <fredg@paravelsystems.com>
* Updated the 'helpers/rdtrans.sh' utility.
2022-09-29 Fred Gleason <fredg@paravelsystems.com>
* Modified rddbmgr(8) to include the Realm name in its default
output.

View File

@@ -2,7 +2,7 @@
//
// Print the status of a database.
//
// (C) Copyright 2018-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -39,9 +39,27 @@ bool MainObject::PrintStatus(QString *err_msg) const
printf("not a Rivendell database!\n");
return true;
}
if(schema>=353) {
sql=QString("select ")+
"`REALM_NAME` "+ // 00
"from `SYSTEM`";
q=new RDSqlQuery(sql);
if(q->first()) {
printf("Rivendell database, schema %d [%s] (%s)\n",schema,
GetSchemaVersion(schema).toUtf8().constData(),
q->value(0).toString().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());
}
delete q;
}
else {
printf("Rivendell database, schema %d [%s]\n",schema,
GetSchemaVersion(schema).toUtf8().constData());
}
*err_msg="ok";
return true;